fix: make it work with new vite
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { resources } from "@lib/resources.ts";
|
||||
import { Link } from "@islands/Link.tsx";
|
||||
import { Emoji } from "@components/Emoji.tsx";
|
||||
import KMenuButton from "@islands/KMenuButton.tsx";
|
||||
import { PageProps } from "fresh";
|
||||
import { define } from "../utils.ts";
|
||||
|
||||
export default function MyLayout({ Component }: PageProps) {
|
||||
export default define.layout(function ({ Component }: PageProps) {
|
||||
return (
|
||||
<div
|
||||
class="md:grid mx-auto"
|
||||
@@ -14,12 +14,12 @@ export default function MyLayout({ Component }: PageProps) {
|
||||
<nav class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0">
|
||||
{Object.values(resources).map((m) => {
|
||||
return (
|
||||
<Link
|
||||
<a
|
||||
href={m.link}
|
||||
class="flex items-center gap-2 text-white data-[current]:bg-white data-[current]:text-black p-3 text-xl w-full rounded-2xl"
|
||||
class="flex items-center gap-2 text-white data-current:bg-white data-current:text-black p-3 text-xl w-full rounded-2xl"
|
||||
>
|
||||
<Emoji class="w-6 h-6" name={m.emoji} /> {m.name}
|
||||
</Link>
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
@@ -30,4 +30,4 @@ export default function MyLayout({ Component }: PageProps) {
|
||||
<KMenuButton />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user