Skip to content

Commit 4b0842d

Browse files
authored
General tweaks to the site (#6)
1 parent 9b67686 commit 4b0842d

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

packages/nextjs/app/faqs/page.tsx

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import Link from "next/link";
1+
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";
22

3-
// ToDo:
4-
// - Review the existing FAQs
5-
// - Talk about the deployed network (Optimism?) / real ETH
63
const faqs = [
74
{
85
id: 1,
@@ -16,7 +13,7 @@ const faqs = [
1613
question: "How should I complete the challenges?",
1714
answer:
1815
"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:",
19-
link: "https://github.com/buidlguidl/ctf-devcon",
16+
link: "https://github.com/buidlguidl/ctf.buidlguidl.com/tree/extension",
2017
},
2118
{
2219
id: 3,
@@ -28,7 +25,7 @@ const faqs = [
2825
id: 4,
2926
question: "What chain/network is this game on?",
3027
answer:
31-
"The challenges are deployed on Optimism mainnet. You will need to use real ETH on Optimism in order to complete the challenges.",
28+
"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!",
3229
},
3330
{
3431
id: 5,
@@ -51,6 +48,11 @@ const faqs = [
5148
},
5249
];
5350

51+
export const metadata = getMetadata({
52+
title: "FAQs",
53+
description: "Check out the FAQs for the BuidlGuidl CTF",
54+
});
55+
5456
export default function FaqsPage() {
5557
return (
5658
<div className="mx-auto max-w-7xl px-6 py-16 sm:py-24 lg:px-8">
@@ -65,9 +67,9 @@ export default function FaqsPage() {
6567
<dd className="mt-2 text-base/7 text-gray-200">
6668
{faq.answer}{" "}
6769
{faq.link && (
68-
<Link className="text-primary link" href={faq.link}>
70+
<a className="text-primary link" href={faq.link} target="_blank">
6971
{faq.link}
70-
</Link>
72+
</a>
7173
)}
7274
</dd>
7375
</div>

packages/nextjs/app/profile/[address]/page.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import Image from "next/image";
22
import { UserData } from "~~/components/UserData";
33
import { getChallenges } from "~~/utils/getChallenges";
4+
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";
45

56
interface ProfilePageProps {
67
params: {
78
address: string;
89
};
910
}
1011

12+
export async function generateMetadata({ params }: ProfilePageProps) {
13+
const { address } = params;
14+
const displayAddress = address?.slice(0, 4) + "..." + address?.slice(-4);
15+
return getMetadata({
16+
title: `${displayAddress} Profile`,
17+
description: `Check out ${address} progress in the BuidlGuidl CTF`,
18+
});
19+
}
20+
1121
export default async function ProfilePage({ params }: ProfilePageProps) {
1222
const { address } = params;
1323
const challenges = await getChallenges();

packages/nextjs/app/stats/layout.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";
2+
3+
export const metadata = getMetadata({
4+
title: "Stats",
5+
description: "Check out the stats for the BuidlGuidl CTF",
6+
});
7+
8+
export default function StatsLayout({ children }: { children: React.ReactNode }) {
9+
return children;
10+
}

packages/nextjs/data/challenges/1.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ Try to complete as many challenges as possible and get all the flags back from t
1010

1111
## Player Progress
1212

13-
Check your progress by visiting `/profile/{YourRegisteredAddress}`.
14-
15-
You may also connect your registered Ethereum address to this website and view your progress by clicking on "My Flags".
13+
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.
1614

1715
## Hints
1816

1917
- You can use the [/debug](/debug) page or [ABI Ninja](https://abi.ninja/) to interact with the contract
20-
- 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.
18+
- 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.
2119
- After Challenge #1, you may complete the other challenges in any order.
2220

2321
## FAQs

0 commit comments

Comments
 (0)