fix: misc.

This commit is contained in:
ItzNotABug
2025-02-24 10:29:19 +05:30
parent c9bac5309f
commit 8d71b1074b
2 changed files with 2 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import { dev } from '$app/environment'; import { dev } from '$app/environment';
import { SENTRY_DSN } from '$lib/constants'; import { SENTRY_DSN } from '$lib/constants';
import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit'; import { handleErrorWithSentry } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit'; import * as Sentry from '@sentry/sveltekit';
Sentry.init({ Sentry.init({

View File

@@ -65,11 +65,7 @@
}); });
} }
let platform = $page.params.platform as Platform;
onMount(() => { onMount(() => {
platform = ($preferredPlatform ?? $page.params.platform) as Platform;
preferredPlatform.set(platform); preferredPlatform.set(platform);
preferredVersion.set($page.params.version as Version); preferredVersion.set($page.params.version as Version);
}); });
@@ -83,6 +79,7 @@
// the service description up to the first full stop, providing sufficient information. // the service description up to the first full stop, providing sufficient information.
$: shortenedDescription = serviceDescription.substring(0, serviceDescription.indexOf('.') + 1); $: shortenedDescription = serviceDescription.substring(0, serviceDescription.indexOf('.') + 1);
$: platform = ($preferredPlatform ?? $page.params.platform) as Platform;
$: platformType = platform.startsWith('client-') ? 'CLIENT' : 'SERVER'; $: platformType = platform.startsWith('client-') ? 'CLIENT' : 'SERVER';
$: serviceName = serviceMap[data.service?.name]; $: serviceName = serviceMap[data.service?.name];
$: title = serviceName + API_REFERENCE_TITLE_SUFFIX; $: title = serviceName + API_REFERENCE_TITLE_SUFFIX;