Skip to content

Commit f09369f

Browse files
committed
Code Refactor
1 parent 841c3d7 commit f09369f

File tree

4 files changed

+128
-106
lines changed

4 files changed

+128
-106
lines changed

components/Home/Hero.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {prefix} from '../../constants'
12

23
const Hero = () => {
34
return (
@@ -21,7 +22,7 @@ const Hero = () => {
2122
</div>
2223

2324
<div className='w-full md:w-2/5 flex mx-auto items-end'>
24-
<img src='/hero.gif' className='object-contain' alt='Web3' />
25+
<img src={prefix+'/hero.gif'} className='object-contain' alt='Web3' />
2526
</div>
2627
</div>
2728
</div>

pages/moderators.js

Lines changed: 54 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,7 @@
11
import Head from 'next/head'
22
import { AiOutlineTwitter, AiOutlineGithub } from 'react-icons/ai'
33

4-
export default function Moderators() {
5-
const data = [
6-
{
7-
name: 'David Leal',
8-
bio: 'Open-source maintainer/contributor 💻 Bot/website maintainer for @Heptagram 🤖 @Minetest mod/game maintainer & creator 🎮 Discord moderator in 20+ servers 🛡 Open-source/DSA mentor 🛠',
9-
imgUrl: 'https://github.com/Panquesito7.png',
10-
twitterUrl: 'https://twitter.com/David_Leal_7',
11-
githubUrl: 'https://github.com/Panquesito7'
12-
},
13-
{
14-
name: 'Ritvik Shukla',
15-
bio: 'Co-Founder | Open Source Enthusiast | Poet | Community 💛',
16-
imgUrl: 'https://github.com/shuklaritvik06.png',
17-
twitterUrl: 'https://twitter.com/ShuklaRitvik06',
18-
githubUrl: 'https://github.com/shuklaritvik06'
19-
},
20-
{
21-
name: 'Shubham Kukreti',
22-
bio: 'Co-Founder | Web3 & Open Source Enthusiast | Community ❤️',
23-
imgUrl: 'https://github.com/KukretiShubham.png',
24-
twitterUrl: 'https://twitter.com/ShubhamKukretii',
25-
githubUrl: 'https://github.com/KukretiShubham'
26-
},
27-
{
28-
name: 'Vincent Villafuerte',
29-
bio: 'Founder | Octocat lover | OSS Advocate | DevRel | Community guy 🚩',
30-
imgUrl: 'https://github.com/vinzvinci.png',
31-
twitterUrl: 'https://twitter.com/vinzvinci',
32-
githubUrl: 'https://github.com/vinzvinci'
33-
},
34-
{
35-
name: 'Max Kubik',
36-
bio: 'Web2 Fullstack Software Engineer 💠 I build webapps and mobile apps for the industry field 🔧 Transitioning to Web3 stacks 🌠 Maintainer for @Web3community 🍬 Open-source newbie!',
37-
imgUrl: 'https://github.com/mkubdev.png',
38-
twitterUrl: 'https://twitter.com/digikube1',
39-
githubUrl: 'https://github.com/mkubdev'
40-
},
41-
{
42-
name: 'Krish Gupta',
43-
bio: "Started my tech journey on 30th September 2021. Since then, I am learning new things and growing my network. I love to chat, collaborate and contribute. I am an open sourcer, that's my complete bio.",
44-
imgUrl: 'https://github.com/krshdev.png',
45-
twitterUrl: 'https://twitter.com/krishguptadev',
46-
githubUrl: 'https://github.com/krishguptadev'
47-
}
48-
]
49-
4+
export default function Moderators({ moderatorsdata }) {
505
return (
516
<>
527
<Head>
@@ -66,7 +21,7 @@ export default function Moderators() {
6621
<div className='container mx-auto'>
6722
<div className='flex flex-wrap md:-mx-3 gap-6'>
6823
<div className='text-black grid grid-col-1 p-3 gap-y-3 md:grid lg:grid-cols-2 md:gap-3 md:p-3'>
69-
{data.map(({ name, bio, imgUrl, twitterUrl, githubUrl }, index) => (
24+
{moderatorsdata.map(({ name, bio, imgUrl, twitterUrl, githubUrl }, index) => (
7025
<div
7126
key={name + index}
7227
className='cursor-pointer hover:z-10 bg-white flex-1 rounded-md shadow focus:outline-none focus:shadow-outline transform transition hover:shadow-lg hover:scale-105 duration-300 ease-in-out p-4'
@@ -113,3 +68,55 @@ export default function Moderators() {
11368
</>
11469
)
11570
}
71+
72+
export function getStaticProps() {
73+
const data = [
74+
{
75+
name: 'David Leal',
76+
bio: 'Open-source maintainer/contributor 💻 Bot/website maintainer for @Heptagram 🤖 @Minetest mod/game maintainer & creator 🎮 Discord moderator in 20+ servers 🛡 Open-source/DSA mentor 🛠',
77+
imgUrl: 'https://github.com/Panquesito7.png',
78+
twitterUrl: 'https://twitter.com/David_Leal_7',
79+
githubUrl: 'https://github.com/Panquesito7'
80+
},
81+
{
82+
name: 'Ritvik Shukla',
83+
bio: 'Co-Founder | Open Source Enthusiast | Poet | Community 💛',
84+
imgUrl: 'https://github.com/shuklaritvik06.png',
85+
twitterUrl: 'https://twitter.com/ShuklaRitvik06',
86+
githubUrl: 'https://github.com/shuklaritvik06'
87+
},
88+
{
89+
name: 'Shubham Kukreti',
90+
bio: 'Co-Founder | Web3 & Open Source Enthusiast | Community ❤️',
91+
imgUrl: 'https://github.com/KukretiShubham.png',
92+
twitterUrl: 'https://twitter.com/ShubhamKukretii',
93+
githubUrl: 'https://github.com/KukretiShubham'
94+
},
95+
{
96+
name: 'Vincent Villafuerte',
97+
bio: 'Founder | Octocat lover | OSS Advocate | DevRel | Community guy 🚩',
98+
imgUrl: 'https://github.com/vinzvinci.png',
99+
twitterUrl: 'https://twitter.com/vinzvinci',
100+
githubUrl: 'https://github.com/vinzvinci'
101+
},
102+
{
103+
name: 'Max Kubik',
104+
bio: 'Web2 Fullstack Software Engineer 💠 I build webapps and mobile apps for the industry field 🔧 Transitioning to Web3 stacks 🌠 Maintainer for @Web3community 🍬 Open-source newbie!',
105+
imgUrl: 'https://github.com/mkubdev.png',
106+
twitterUrl: 'https://twitter.com/digikube1',
107+
githubUrl: 'https://github.com/mkubdev'
108+
},
109+
{
110+
name: 'Krish Gupta',
111+
bio: "Started my tech journey on 30th September 2021. Since then, I am learning new things and growing my network. I love to chat, collaborate and contribute. I am an open sourcer, that's my complete bio.",
112+
imgUrl: 'https://github.com/krshdev.png',
113+
twitterUrl: 'https://twitter.com/krishguptadev',
114+
githubUrl: 'https://github.com/krishguptadev'
115+
}
116+
]
117+
return {
118+
props: {
119+
moderatorsdata: data
120+
}
121+
}
122+
}

pages/partners.js

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,7 @@
11
import Head from 'next/head'
22
import { prefix } from '../constants'
33

4-
export default function Partners() {
5-
const data = [
6-
{
7-
name: 'dev protocol',
8-
imgUrl: '/logo 3.4.png',
9-
title: 'DEV PROTOCOL',
10-
text: 'Dev Protocol was designed as a unique protocol to fairly evaluate OSS, which has been economically undervalued for decades. It is built on the Ethereum blockchain and brings economic value to all open source activities.'
11-
},
12-
{
13-
name: 'logo1',
14-
imgUrl: '/logo 3 1.png',
15-
title: 'Logo 1',
16-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
17-
},
18-
{
19-
name: 'logo2',
20-
imgUrl: '/logo 3 2.png',
21-
title: 'Logo 2',
22-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
23-
},
24-
{
25-
name: 'logo3',
26-
imgUrl: '/logo 3 3.png',
27-
title: 'Logo 3',
28-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
29-
}
30-
]
31-
4+
export default function Partners({ partnerData }) {
325
return (
336
<>
347
<Head>
@@ -48,7 +21,7 @@ export default function Partners() {
4821
<div className='container mx-auto'>
4922
<div className='flex flex-wrap gap-6'>
5023
<div className='text-black grid grid-col-1 p-3 gap-y-3 md:grid md:grid-cols-2 md:gap-3 md:p-3'>
51-
{data.map(({ name, title, imgUrl, text }, index) => (
24+
{partnerData.map(({ name, title, imgUrl, text }, index) => (
5225
<div
5326
key={name + index}
5427
className='cursor-pointer bg-white flex-1 rounded-md shadow focus:outline-none focus:shadow-outline transform transition hover:shadow-lg hover:scale-105 hover:z-10 duration-300 ease-in-out p-4'
@@ -76,3 +49,37 @@ export default function Partners() {
7649
</>
7750
)
7851
}
52+
53+
export function getStaticProps() {
54+
const data = [
55+
{
56+
name: 'dev protocol',
57+
imgUrl: '/logo 3.4.png',
58+
title: 'DEV PROTOCOL',
59+
text: 'Dev Protocol was designed as a unique protocol to fairly evaluate OSS, which has been economically undervalued for decades. It is built on the Ethereum blockchain and brings economic value to all open source activities.'
60+
},
61+
{
62+
name: 'logo1',
63+
imgUrl: '/logo 3 1.png',
64+
title: 'Logo 1',
65+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
66+
},
67+
{
68+
name: 'logo2',
69+
imgUrl: '/logo 3 2.png',
70+
title: 'Logo 2',
71+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
72+
},
73+
{
74+
name: 'logo3',
75+
imgUrl: '/logo 3 3.png',
76+
title: 'Logo 3',
77+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.'
78+
}
79+
]
80+
return {
81+
props: {
82+
partnerData: data
83+
}
84+
}
85+
}

pages/projects.js

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,7 @@
11
import Head from 'next/head'
22
import { prefix } from '../constants'
33

4-
export default function Projects() {
5-
const data = [
6-
{
7-
name: 'InVision',
8-
imgUrl: '/blogs_inVision.png',
9-
type: 'PREMIUM',
10-
title: 'Start Here',
11-
text: 'InVision is the digital product design platform used to make the worlds best customer experiences.',
12-
tags: ['Documentation']
13-
},
14-
{
15-
name: 'Adobe XD',
16-
imgUrl: '/blogs_xd.png',
17-
type: 'FREE',
18-
title: 'Blockchain Dev Path',
19-
text: 'Adobe XD is your UI/UX design solution platform for website and mobile appcreation.',
20-
tags: ['Documentation']
21-
},
22-
{
23-
name: 'Figma',
24-
imgUrl: '/blogs_figma.png',
25-
type: 'FREE',
26-
title: 'Website',
27-
text: 'Figma helps the teams to create, test, and ship better designs from start to finish.',
28-
tags: ['Tailwind Css', 'Eleventy', 'Alpine.js']
29-
}
30-
]
31-
4+
export default function Projects({ projectsData }) {
325
return (
336
<>
347
<Head>
@@ -45,7 +18,7 @@ export default function Projects() {
4518
</section>
4619

4720
<div className='container max-w-screen-xl mx-auto my-8 grid pb-8 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 mb-8 gap-6 px-8'>
48-
{data.map(({ name, imgUrl, type, title, text, tags }, index) => (
21+
{projectsData.map(({ name, imgUrl, type, title, text, tags }, index) => (
4922
<div
5023
key={name + index}
5124
className='flex flex-col justify-between items-stretch col-span-3 md:col-span-1 cursor-pointer p-2 shadow rounded-md focus:outline-none focus:shadow-outline transform transition hover:shadow-lg hover:scale-105 duration-300 ease-in-out'
@@ -88,3 +61,37 @@ export default function Projects() {
8861
</>
8962
)
9063
}
64+
65+
export function getStaticProps() {
66+
const data = [
67+
{
68+
name: 'InVision',
69+
imgUrl: '/blogs_inVision.png',
70+
type: 'PREMIUM',
71+
title: 'Start Here',
72+
text: 'InVision is the digital product design platform used to make the worlds best customer experiences.',
73+
tags: ['Documentation']
74+
},
75+
{
76+
name: 'Adobe XD',
77+
imgUrl: '/blogs_xd.png',
78+
type: 'FREE',
79+
title: 'Blockchain Dev Path',
80+
text: 'Adobe XD is your UI/UX design solution platform for website and mobile appcreation.',
81+
tags: ['Documentation']
82+
},
83+
{
84+
name: 'Figma',
85+
imgUrl: '/blogs_figma.png',
86+
type: 'FREE',
87+
title: 'Website',
88+
text: 'Figma helps the teams to create, test, and ship better designs from start to finish.',
89+
tags: ['Tailwind Css', 'Eleventy', 'Alpine.js']
90+
}
91+
]
92+
return {
93+
props: {
94+
projectsData: data
95+
}
96+
}
97+
}

0 commit comments

Comments
 (0)