Skip to content

Commit

Permalink
add header and filter section UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Starzynski committed Aug 30, 2024
1 parent aed5c9e commit 0ff5cb6
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/app/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const NavItems: { path: string; title: string }[] = [
path: "/rewards",
title: "rewards",
},
{
path: "/team",
title: "team",
},
{
path: "/roadmap",
title: "roadmap",
Expand Down
1 change: 1 addition & 0 deletions src/app/state/locales/en/team.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"team": "Team",
"meet_our_contributors": "Meet our contributors",
"we_have_a_diverse_talented": "We have a diverse, talented pool of contributors from various fields and locations worldwide. Anyone can join. Browse our current active or past members and connect with contributors to collaborate."
}
1 change: 1 addition & 0 deletions src/app/state/locales/pt/team.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"team": "Equipe",
"meet_our_contributors": "Conheça nossos colaboradores",
"we_have_a_diverse_talented": "Temos um grupo diversificado e talentoso de colaboradores de várias áreas e localizações ao redor do mundo. Qualquer pessoa pode participar. Explore nossos membros atuais ou passados e conecte-se com colaboradores para colaborar."
}
45 changes: 40 additions & 5 deletions src/app/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,61 @@ export default function Rewards() {

return (
<div className="bg-[#141414] grow flex items-center justify-center">
<div>
{/* <HeaderComponent /> */}
<div className="max-w-[1000px] p-8">
<HeaderComponent />
<Filters />
<Contributors />
</div>
</div>
);
}

function Contributors() {
function Filters() {
return (
<div className="text-center text-base mt-8">
<p>Activity status</p>
<FilterToggle label="Active" />
<FilterToggle label="Past" />
<FilterToggle label="All" />
<p className="!mt-4">Area of work</p>
<FilterToggle label="All" />
<FilterToggle label="Admin" />
<FilterToggle label="Dev" />
<FilterToggle label="Design" />
<FilterToggle label="Social media" />
<FilterToggle label="Testing" />
</div>
);
}

function FilterToggle({ label }: { label: string }) {
return (
<div className="inline-block mx-1 my-3 px-6 py-3 bg-black opacity-25 rounded-badge hover:opacity-100">
<p className="uppercase">{label}</p>
</div>
);
}

function HeaderComponent() {
const t = useTranslations();
return (
<div>
<div className="text-center">
<DexterHeading title={t("meet_our_contributors")} />
<DexterParagraph text={t("we_have_a_diverse_talented")} />
</div>
);
}

function Contributors() {
return <div></div>;
}

function DexterParagraph({ text }: { text: string }) {
return <p className="text-sm tracking-wide py-2">{text}</p>;
return (
<div className="flex items-center justify-center">
<p className="max-w-[600px] text-sm tracking-wide py-2">{text}</p>
</div>
);
}

function DexterHeading({ title }: { title: string }) {
Expand Down
15 changes: 15 additions & 0 deletions src/app/utils/GoogleSheet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* This Service loads data from a google sheet as single string in CSV format
*/
const fetchSheet = async (sheetId: string, gic: string) => {
const url = `https://docs.google.com/spreadsheets/d/${sheetId}/export?format=csv&gid=${gic}`;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.text(); // Getting the CSV data as text
};

export const GoogleSheet = {
fetch: fetchSheet,
};

0 comments on commit 0ff5cb6

Please sign in to comment.