From d50a1ebe3bed808fe4d2af7e68dc3a2126a52705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Thu, 5 Sep 2024 10:45:02 +0200 Subject: [PATCH] Remove use client, metas --- .../app/submissions/_components/SubmissionCard.tsx | 2 -- packages/nextjs/app/submissions/page.tsx | 10 ++++++++-- packages/nextjs/utils/scaffold-eth/getMetadata.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/nextjs/app/submissions/_components/SubmissionCard.tsx b/packages/nextjs/app/submissions/_components/SubmissionCard.tsx index b68eb75..16b28a8 100644 --- a/packages/nextjs/app/submissions/_components/SubmissionCard.tsx +++ b/packages/nextjs/app/submissions/_components/SubmissionCard.tsx @@ -1,5 +1,3 @@ -"use client"; - import { Address } from "~~/components/scaffold-eth"; import { Submission } from "~~/services/database/repositories/submissions"; diff --git a/packages/nextjs/app/submissions/page.tsx b/packages/nextjs/app/submissions/page.tsx index e3ba84c..4b8547d 100644 --- a/packages/nextjs/app/submissions/page.tsx +++ b/packages/nextjs/app/submissions/page.tsx @@ -1,8 +1,14 @@ import { SubmissionCard } from "./_components/SubmissionCard"; import type { NextPage } from "next"; import { getAllSubmissions } from "~~/services/database/repositories/submissions"; +import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; -const Admin: NextPage = async () => { +export const metadata = getMetadata({ + title: "Submissions", + description: "Check all the submissions for the SE-2 extensions hackathon.", +}); + +const Submissions: NextPage = async () => { const submissions = await getAllSubmissions(); return ( @@ -21,4 +27,4 @@ const Admin: NextPage = async () => { ); }; -export default Admin; +export default Submissions; diff --git a/packages/nextjs/utils/scaffold-eth/getMetadata.ts b/packages/nextjs/utils/scaffold-eth/getMetadata.ts index ad531ae..6787e37 100644 --- a/packages/nextjs/utils/scaffold-eth/getMetadata.ts +++ b/packages/nextjs/utils/scaffold-eth/getMetadata.ts @@ -3,7 +3,7 @@ import type { Metadata } from "next"; const baseUrl = process.env.VERCEL_PROJECT_PRODUCTION_URL ? `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}` : `http://localhost:${process.env.PORT || 3000}`; -const titleTemplate = "%s | Scaffold-ETH 2"; +const titleTemplate = "%s | Extensions Hackathon"; export const getMetadata = ({ title,