Skip to content

Commit 175411c

Browse files
committed
Merge branch 'main' of https://github.com/Developer-DAO/academy into lesson-5-quizzes
2 parents a819ae6 + a6e7b5a commit 175411c

35 files changed

+1922
-810
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['next/core-web-vitals', 'plugin:storybook/recommended'],
2+
extends: ['next/core-web-vitals'],
33
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ yarn-error.log*
2727

2828
# local env files
2929
.env*.local
30+
.env
3031

3132
# vercel
3233
.vercel

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

components/Header.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/Hero.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from '@chakra-ui/react'
1212
import { ArrowForwardIcon } from '@chakra-ui/icons'
1313
import Image from 'next/image'
14+
import NextLink from 'next/link'
1415

1516
const Hero = () => {
1617
return (
@@ -45,6 +46,7 @@ const Hero = () => {
4546
<Link
4647
href={'/getting-started'}
4748
alignSelf={{ base: 'center', md: 'flex-start' }}
49+
as={NextLink}
4850
>
4951
<Button
5052
colorScheme="pink"

components/Layout.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import NavBar from '@components/NavBar'
2+
import Footer from '@components/footer/Footer'
3+
import { Box } from '@chakra-ui/react'
4+
5+
const Layout = ({ children }: { children: React.ReactNode }) => {
6+
return (
7+
<>
8+
<NavBar />
9+
<Box
10+
p="1.25em"
11+
px="5%"
12+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
13+
as="main"
14+
minH={{ base: 'calc(75vh - 3.5rem)' }}
15+
>
16+
{children}
17+
</Box>
18+
<Footer />
19+
</>
20+
)
21+
}
22+
23+
export default Layout

components/NavBar.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ import { PomodoroTimer } from '@components/PomodoroTimer'
1919
function NavBar() {
2020
const router = useRouter()
2121
return (
22-
<Box>
22+
<Box
23+
p="1.25em"
24+
px="5%"
25+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
26+
as="header"
27+
>
2328
<Flex justify="left" alignItems="center">
2429
<Link as={NextLink} variant="logo" href={'/'}>
2530
{router.pathname.endsWith('/[slug]') ? (
@@ -79,7 +84,7 @@ function NavBar() {
7984
GET STARTED
8085
</Link>
8186
</MenuItem>
82-
<MenuItem>
87+
{/* <MenuItem>
8388
<Link
8489
as={NextLink}
8590
href="/lessons"
@@ -92,7 +97,7 @@ function NavBar() {
9297
>
9398
Tracks
9499
</Link>
95-
</MenuItem>
100+
</MenuItem> */}
96101
</MenuList>
97102
</Menu>
98103
</Flex>
@@ -131,7 +136,7 @@ function NavBar() {
131136
Get Started
132137
</Link>
133138

134-
<Link
139+
{/* <Link
135140
as={NextLink}
136141
href="/lessons"
137142
passHref
@@ -142,7 +147,7 @@ function NavBar() {
142147
}
143148
>
144149
Tracks
145-
</Link>
150+
</Link> */}
146151

147152
{/* <Button colorScheme="gray" variant="solid">
148153
<ConnectButton chainStatus="icon" showBalance={false} />

components/PageSeoLayout.tsx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { NextSeo } from 'next-seo'
2+
3+
interface PageSeoLayoutProps {
4+
title: string
5+
description?: string
6+
children?: React.ReactNode
7+
}
8+
9+
const PageSeoLayout = ({
10+
title,
11+
description,
12+
children,
13+
}: PageSeoLayoutProps) => {
14+
return (
15+
<>
16+
<NextSeo
17+
title={`Developer DAO Academy | ${title}`}
18+
description={description}
19+
openGraph={{
20+
type: 'website',
21+
locale: 'en_US',
22+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
23+
site_name: `Developer DAO Academy`,
24+
title: `Developer DAO Academy | ${title}`,
25+
description: `${description}`,
26+
images: [
27+
{
28+
url: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/landing-page-screenshot.png`,
29+
alt: 'Developer DAO Academy',
30+
type: 'image/png',
31+
},
32+
],
33+
}}
34+
twitter={{
35+
handle: '@devdao_academy',
36+
site: '@devdao_academy',
37+
cardType: 'summary_large_image',
38+
}}
39+
additionalLinkTags={[
40+
{
41+
rel: 'icon',
42+
href: '/favicon/favicon.ico',
43+
},
44+
]}
45+
/>
46+
{children}
47+
</>
48+
)
49+
}
50+
51+
export default PageSeoLayout

components/footer/Footer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default function Footer() {
1414
return (
1515
<Box
1616
// bg={useColorModeValue('#00000f', '#1d1e20')}
17+
p="1.25em"
18+
px="5%"
19+
mx={{ base: '2rem', md: '6rem', lg: '10rem' }}
20+
as="footer"
1721
color={useColorModeValue('gray.700', 'gray.200')}
1822
>
1923
<Container

components/mdx/ContributorFooter.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export function ContributorFooter({
2626
{authors.length > 1 ? 'Authors' : 'Author'}
2727
</Text>
2828
<VStack spacing={4} alignItems="left">
29-
{authors.map((contrib) => {
30-
return <Contributor handle={contrib} avatarSize="2xl" />
29+
{authors.map((contrib, idx) => {
30+
return <Contributor key={idx} handle={contrib} avatarSize="2xl" />
3131
})}
3232
</VStack>
3333
</Box>
@@ -39,8 +39,8 @@ export function ContributorFooter({
3939
{reviewers.length > 1 ? 'Reviewers' : 'Reviewer'}
4040
</Text>
4141
<VStack spacing={4} alignItems="left">
42-
{reviewers.map((contrib) => {
43-
return <Contributor handle={contrib} avatarSize="lg" />
42+
{reviewers.map((contrib, idx) => {
43+
return <Contributor key={idx} handle={contrib} avatarSize="lg" />
4444
})}
4545
</VStack>
4646
</Box>
@@ -56,8 +56,10 @@ export function ContributorFooter({
5656
: 'Additional Contributor'}
5757
</Text>
5858
<VStack spacing={4} alignItems="left">
59-
{contributors.map((contrib) => {
60-
return <Contributor handle={contrib} avatarSize="lg" />
59+
{contributors.map((contrib, idx) => {
60+
return (
61+
<Contributor key={idx} handle={contrib} avatarSize="lg" />
62+
)
6163
})}
6264
</VStack>
6365
</Box>

0 commit comments

Comments
 (0)