From 61426a81cb5500afb3203bf1a7570ad7b1a34c3b Mon Sep 17 00:00:00 2001 From: RedBeardEth <90423049+RedBeardEth@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:55:16 +1100 Subject: [PATCH] fix game page and cleanup --- .../src/app/(app)/account/assets/page.tsx | 6 -- .../app/(app)/account/assets/realms/page.tsx | 10 --- apps/nextjs/src/app/(app)/blogs/BlogGrid.tsx | 27 ++++--- .../src/app/(app)/blogs/[slug]/page.tsx | 18 ++--- .../src/app/(app)/games/[slug]/page.tsx | 76 +++++++++++++------ 5 files changed, 73 insertions(+), 64 deletions(-) diff --git a/apps/nextjs/src/app/(app)/account/assets/page.tsx b/apps/nextjs/src/app/(app)/account/assets/page.tsx index c893cd93..7a88857c 100644 --- a/apps/nextjs/src/app/(app)/account/assets/page.tsx +++ b/apps/nextjs/src/app/(app)/account/assets/page.tsx @@ -1,5 +1,4 @@ import type { Metadata } from "next"; -import AssetL2CollectionPreview from "@/app/(app)/account/assets/AssetL2CollectionPreview"; import { Collections } from "@realms-world/constants"; @@ -18,11 +17,6 @@ export default function Page() { <>
- {/* - - - - */}
); diff --git a/apps/nextjs/src/app/(app)/account/assets/realms/page.tsx b/apps/nextjs/src/app/(app)/account/assets/realms/page.tsx index 54dbb705..edd79a95 100644 --- a/apps/nextjs/src/app/(app)/account/assets/realms/page.tsx +++ b/apps/nextjs/src/app/(app)/account/assets/realms/page.tsx @@ -1,11 +1,6 @@ import type { Metadata } from "next"; -import AssetL2CollectionPreview from "@/app/(app)/account/assets/AssetL2CollectionPreview"; - -import { Collections, CollectionAddresses } from "@realms-world/constants"; import { BridgeNftWrapper } from "../BridgeNftWrapper"; -import { Portfolio } from "../Portfolio"; -import { SUPPORTED_L2_CHAIN_ID } from "@/constants/env"; export function generateMetadata(): Metadata { return { @@ -19,11 +14,6 @@ export default function Page() { <>
- {/* - - - - */}
); diff --git a/apps/nextjs/src/app/(app)/blogs/BlogGrid.tsx b/apps/nextjs/src/app/(app)/blogs/BlogGrid.tsx index 13b47b99..34ae7db7 100644 --- a/apps/nextjs/src/app/(app)/blogs/BlogGrid.tsx +++ b/apps/nextjs/src/app/(app)/blogs/BlogGrid.tsx @@ -2,19 +2,18 @@ import { BlogCard } from "./BlogCard"; import { reader } from "@/utils/keystatic"; export const BlogGrid = async () => { - const blogs = await reader.collections.blogs.all(); - const blogsSortedByDate = blogs.sort(function (a, b) { - // Turn your strings into dates, and then subtract them - // to get a value that is either negative, positive, or zero. - return new Date(b?.entry.publishDate) - new Date(a?.entry.publishDate); - }); + const blogs = await reader.collections.blogs.all(); + const blogsSortedByDate = blogs.sort(function (a, b) { + // Turn your strings into dates, and then subtract them + // to get a value that is either negative, positive, or zero. + return new Date(b?.entry.publishDate) - new Date(a?.entry.publishDate); + }); - - return ( -
- {blogsSortedByDate.map((blog, index) => ( - - ))} -
- ); + return ( +
+ {blogsSortedByDate.map((blog, index) => ( + + ))} +
+ ); }; diff --git a/apps/nextjs/src/app/(app)/blogs/[slug]/page.tsx b/apps/nextjs/src/app/(app)/blogs/[slug]/page.tsx index 9a02f23f..d803b6da 100644 --- a/apps/nextjs/src/app/(app)/blogs/[slug]/page.tsx +++ b/apps/nextjs/src/app/(app)/blogs/[slug]/page.tsx @@ -54,13 +54,13 @@ export default async function Page({ params }: { params: { slug: string } }) { const errors = Markdoc.validate(node); if (errors.length) { console.error(errors); - throw new Error('Invalid content'); + throw new Error("Invalid content"); } const renderable = Markdoc.transform(node); return ( <> -
+
@@ -77,8 +77,8 @@ export default async function Page({ params }: { params: { slug: string } }) {

{blog?.subtitle}

Posted on -