diff --git a/packages/nextjs/app/faqs/page.tsx b/packages/nextjs/app/faqs/page.tsx index 4b6c32d..741cd56 100644 --- a/packages/nextjs/app/faqs/page.tsx +++ b/packages/nextjs/app/faqs/page.tsx @@ -1,8 +1,5 @@ -import Link from "next/link"; +import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; -// ToDo: -// - Review the existing FAQs -// - Talk about the deployed network (Optimism?) / real ETH const faqs = [ { id: 1, @@ -16,7 +13,7 @@ const faqs = [ question: "How should I complete the challenges?", answer: "Advanced players may use any means necessary to progress through the challenges. We recommend that beginners use this Scaffold ETH extension that contains everything you need to play the game and test your solutions locally:", - link: "https://github.com/buidlguidl/ctf-devcon", + link: "https://github.com/buidlguidl/ctf.buidlguidl.com/tree/extension", }, { id: 3, @@ -28,7 +25,7 @@ const faqs = [ id: 4, question: "What chain/network is this game on?", answer: - "The challenges are deployed on Optimism mainnet. You will need to use real ETH on Optimism in order to complete the challenges.", + "The challenges are deployed on Optimism mainnet. You will need to use real ETH on Optimism in order to complete the challenges. But you can always play locally!", }, { id: 5, @@ -51,6 +48,11 @@ const faqs = [ }, ]; +export const metadata = getMetadata({ + title: "FAQs", + description: "Check out the FAQs for the BuidlGuidl CTF", +}); + export default function FaqsPage() { return (
@@ -65,9 +67,9 @@ export default function FaqsPage() {
{faq.answer}{" "} {faq.link && ( - + {faq.link} - + )}
diff --git a/packages/nextjs/app/profile/[address]/page.tsx b/packages/nextjs/app/profile/[address]/page.tsx index 531382a..0865779 100644 --- a/packages/nextjs/app/profile/[address]/page.tsx +++ b/packages/nextjs/app/profile/[address]/page.tsx @@ -1,6 +1,7 @@ import Image from "next/image"; import { UserData } from "~~/components/UserData"; import { getChallenges } from "~~/utils/getChallenges"; +import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; interface ProfilePageProps { params: { @@ -8,6 +9,15 @@ interface ProfilePageProps { }; } +export async function generateMetadata({ params }: ProfilePageProps) { + const { address } = params; + const displayAddress = address?.slice(0, 4) + "..." + address?.slice(-4); + return getMetadata({ + title: `${displayAddress} Profile`, + description: `Check out ${address} progress in the BuidlGuidl CTF`, + }); +} + export default async function ProfilePage({ params }: ProfilePageProps) { const { address } = params; const challenges = await getChallenges(); diff --git a/packages/nextjs/app/stats/layout.tsx b/packages/nextjs/app/stats/layout.tsx new file mode 100644 index 0000000..ee56ae1 --- /dev/null +++ b/packages/nextjs/app/stats/layout.tsx @@ -0,0 +1,10 @@ +import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; + +export const metadata = getMetadata({ + title: "Stats", + description: "Check out the stats for the BuidlGuidl CTF", +}); + +export default function StatsLayout({ children }: { children: React.ReactNode }) { + return children; +} diff --git a/packages/nextjs/data/challenges/1.md b/packages/nextjs/data/challenges/1.md index 601e4ec..15422cf 100644 --- a/packages/nextjs/data/challenges/1.md +++ b/packages/nextjs/data/challenges/1.md @@ -10,14 +10,12 @@ Try to complete as many challenges as possible and get all the flags back from t ## Player Progress -Check your progress by visiting `/profile/{YourRegisteredAddress}`. - -You may also connect your registered Ethereum address to this website and view your progress by clicking on "My Flags". +Check your progress by connecting your Ethereum Wallet with the address you are using to play the game and click on "My Flags" at the top of the page. ## Hints - You can use the [/debug](/debug) page or [ABI Ninja](https://abi.ninja/) to interact with the contract -- We recommend beginners use this [Scaffold ETH extension](https://github.com/buidlguidl/ctf.buidlguidl.com/tree/ctf-extension) that contains everything you need to play the game and test your solutions locally. Advanced players may use any means necessary to progress. +- We recommend beginners use this [Scaffold ETH CTF extension](https://github.com/buidlguidl/ctf.buidlguidl.com/tree/extension) that contains everything you need to play the game and test your solutions locally. Advanced players may use any means necessary to progress. - After Challenge #1, you may complete the other challenges in any order. ## FAQs