mirror of
https://github.com/LukeHagar/LukeHagar.com.git
synced 2025-12-06 04:20:17 +00:00
Vitals one day?
This commit is contained in:
@@ -1,39 +1,35 @@
|
||||
<script>
|
||||
import "$lib/theme-luke.css";
|
||||
import "@skeletonlabs/skeleton/styles/all.css";
|
||||
import "../app.postcss";
|
||||
import { AppShell } from "@skeletonlabs/skeleton";
|
||||
import Header from "$lib/Header.svelte";
|
||||
import { inject } from "@vercel/analytics";
|
||||
import { env as dynamicEnv } from "$env/dynamic/public";
|
||||
import { browser } from "$app/environment";
|
||||
import { webVitals } from "$lib/vitals";
|
||||
import { page } from "$app/stores";
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import '$lib/theme-luke.css';
|
||||
import '@skeletonlabs/skeleton/styles/all.css';
|
||||
import '../app.postcss';
|
||||
import { AppShell } from '@skeletonlabs/skeleton';
|
||||
import Header from '$lib/Header.svelte';
|
||||
import { inject } from '@vercel/analytics';
|
||||
import { browser } from '$app/environment';
|
||||
import { webVitals } from '$lib/vitals';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
console.log(import.meta.env.VERCEL_ANALYTICS_ID);
|
||||
console.log(dynamicEnv);
|
||||
console.log(import.meta.env);
|
||||
console.log(import.meta.env.VITE_VERCEL_ANALYTICS_ID);
|
||||
export let data: PageData;
|
||||
console.log(data);
|
||||
|
||||
inject();
|
||||
inject();
|
||||
|
||||
let analyticsId = import.meta.env.VERCEL_ANALYTICS_ID;
|
||||
|
||||
$: if (browser && analyticsId) {
|
||||
webVitals({
|
||||
path: $page.url.pathname,
|
||||
params: $page.params,
|
||||
analyticsId,
|
||||
});
|
||||
}
|
||||
// $: if (browser && analyticsId) {
|
||||
// webVitals({
|
||||
// path: $page.url.pathname,
|
||||
// params: $page.params,
|
||||
// analyticsId,
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
|
||||
<!-- App Shell -->
|
||||
<AppShell slotSidebarLeft="bg-surface-500/5 w-56 p-4">
|
||||
<svelte:fragment slot="header">
|
||||
<!-- App Bar -->
|
||||
<Header />
|
||||
</svelte:fragment>
|
||||
<!-- Page Route Content -->
|
||||
<slot />
|
||||
<svelte:fragment slot="header">
|
||||
<!-- App Bar -->
|
||||
<Header />
|
||||
</svelte:fragment>
|
||||
<!-- Page Route Content -->
|
||||
<slot />
|
||||
</AppShell>
|
||||
|
||||
Reference in New Issue
Block a user