Skip to content

Commit

Permalink
Update Fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv committed Mar 25, 2024
1 parent 311e791 commit e0b7382
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"exclude": ["**/_fresh/*", "static/", "lib/dexie-live-query"],
"imports": {
"$fresh/": "https://deno.land/x/[email protected].7/",
"$fresh/": "https://deno.land/x/[email protected].8/",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
Expand All @@ -35,8 +35,7 @@
"clsx": "https://esm.sh/[email protected]",
"tailwind-merge": "https://esm.sh/[email protected]",
"esbuild/": "https://deno.land/x/[email protected]/",
"esbuild_deno_loader/": "https://deno.land/x/[email protected]/",
"preact-parser": "npm:preact-parser"
"esbuild_deno_loader/": "https://deno.land/x/[email protected]/"
},
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }
}
6 changes: 3 additions & 3 deletions routes/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import preactParser from "preact-parser";
import { type PageProps } from "$fresh/server.ts";

const metricsSnippet = Deno.env.get("METRICS_SNIPPET");
const metrics = metricsSnippet ? preactParser.parse(metricsSnippet) : null;

export default function App({ Component, url }: PageProps) {
return (
Expand All @@ -17,7 +15,9 @@ export default function App({ Component, url }: PageProps) {
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/fonts.css" />
<link rel="stylesheet" href="/main.css" />
{metrics}
{metricsSnippet
? <script dangerouslySetInnerHTML={{ __html: metricsSnippet }} />
: null}
</head>
<body class="font-inter bg-background text-foreground select-none" // f-client-nav
>
Expand Down

0 comments on commit e0b7382

Please sign in to comment.