diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c90e65c..ef09f313 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,6 +26,8 @@ jobs:
bun-version-file: package.json
- run: bun install --frozen-lockfile
- run: bun run typecheck
+ - run: bun run lint
+ - run: bun run format:check
- run: bun run build
- run: bunx playwright install --with-deps chromium
- run: bun run test:e2e
diff --git a/knip.json b/knip.json
index b082accb..e7bf52bd 100644
--- a/knip.json
+++ b/knip.json
@@ -2,12 +2,12 @@
"$schema": "https://unpkg.com/knip@6/schema.json",
"workspaces": {
".": {
- "entry": ["src/index.{js,jsx,ts,tsx}"],
- "project": ["src/**/*.{js,jsx,ts,tsx}"]
+ "entry": ["src/index.tsx"],
+ "project": ["src/**/*.{ts,tsx}"]
},
"sanity": {
- "entry": ["sanity.config.{js,ts}", "sanity.cli.{js,ts}"],
- "project": ["**/*.{js,ts}"]
+ "entry": ["sanity.config.ts", "sanity.cli.ts"],
+ "project": ["**/*.ts"]
}
},
"treatTagHintsAsErrors": true,
diff --git a/netlify.toml b/netlify.toml
index a7405332..b609ab2b 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -1,2 +1,2 @@
[build.environment]
- BUN_VERSION = "1.4.2"
+BUN_VERSION = "1.4.2"
diff --git a/oxlint.config.ts b/oxlint.config.ts
index 3c547c94..a301aba9 100644
--- a/oxlint.config.ts
+++ b/oxlint.config.ts
@@ -26,6 +26,7 @@ export default defineConfig({
'.roo/**',
'.windsurf/**',
'tools/oxlint/anti-slop/**',
+ 'sanity/**',
],
jsPlugins: [
{
@@ -90,7 +91,10 @@ export default defineConfig({
'unicorn/prefer-spread': 'warn',
'react/rules-of-hooks': 'error',
'react/require-render-return': 'error',
- 'react/no-multi-comp': 'error',
+ 'react/no-multi-comp': 'off',
+ 'react/jsx-key': ['error', { checkFragmentShorthand: true }],
+ 'import/no-unassigned-import': ['warn', { allow: ['**/*.css'] }],
+ 'jsx-a11y/no-noninteractive-tabindex': ['error', { tags: ['section'] }],
'react/no-unstable-nested-components': 'error',
'react/only-export-components': ['error', { allowConstantExport: true }],
'react-you-might-not-need-an-effect/no-adjust-state-on-prop-change': 'error',
@@ -121,5 +125,11 @@ export default defineConfig({
'typescript/explicit-function-return-type': 'off',
},
},
+ {
+ files: ['src/assets/**/*.tsx', 'src/pages/LandingPageV3/ChooseYourCharacter/Mascot.tsx'],
+ rules: {
+ 'eslint/max-lines-per-function': 'off',
+ },
+ },
],
});
diff --git a/public/css/applyPage.css b/public/css/applyPage.css
index 4983008f..ade1d307 100644
--- a/public/css/applyPage.css
+++ b/public/css/applyPage.css
@@ -15,16 +15,16 @@
}
.ap_img {
- background-image: url('/images/applyBackground.JPG');
- height: 100%;
- width: 100%;
- position: fixed;
- background-color: rgba(0, 0, 0, 0.7);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- z-index: -1;
- filter: brightness(50%);
+ background-image: url('/images/applyBackground.JPG');
+ height: 100%;
+ width: 100%;
+ position: fixed;
+ background-color: rgba(0, 0, 0, 0.7);
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ z-index: -1;
+ filter: brightness(50%);
}
.ap_text {
diff --git a/public/css/style.css b/public/css/style.css
index 1a65a958..53b20833 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -1,78 +1,97 @@
* {
- transition-timing-function: ease-in-out;
- -ms-transition-timing-function: ease-in-out;
- -moz-transition-timing-function: ease-in-out;
- -webkit-transition-timing-function: ease-in-out;
- -o-transition-timing-function: ease-in-out;
- transition-duration: 0.3s;
- -ms-transition-duration: 0.3s;
- -moz-transition-duration: 0.3s;
- -webkit-transition-duration: 0.3s;
- -o-transition-duration: 0.3s;
+ transition-timing-function: ease-in-out;
+ -ms-transition-timing-function: ease-in-out;
+ -moz-transition-timing-function: ease-in-out;
+ -webkit-transition-timing-function: ease-in-out;
+ -o-transition-timing-function: ease-in-out;
+ transition-duration: 0.3s;
+ -ms-transition-duration: 0.3s;
+ -moz-transition-duration: 0.3s;
+ -webkit-transition-duration: 0.3s;
+ -o-transition-duration: 0.3s;
}
@font-face {
- font-family: "Commuters Sans 800";
- src: url("https://use.typekit.net/af/e66d72/00000000000000007735c462/30/l?subset_id=2&fvd=n8&v=3") format("woff2"), url("https://use.typekit.net/af/e66d72/00000000000000007735c462/30/d?subset_id=2&fvd=n8&v=3") format("woff"), url("https://use.typekit.net/af/e66d72/00000000000000007735c462/30/a?subset_id=2&fvd=n8&v=3") format("opentype");
- font-display: auto;
- font-style: normal;
- font-weight: 800;
+ font-family: 'Commuters Sans 800';
+ src:
+ url('https://use.typekit.net/af/e66d72/00000000000000007735c462/30/l?subset_id=2&fvd=n8&v=3') format('woff2'),
+ url('https://use.typekit.net/af/e66d72/00000000000000007735c462/30/d?subset_id=2&fvd=n8&v=3') format('woff'),
+ url('https://use.typekit.net/af/e66d72/00000000000000007735c462/30/a?subset_id=2&fvd=n8&v=3') format('opentype');
+ font-display: auto;
+ font-style: normal;
+ font-weight: 800;
}
@font-face {
- font-family: "Commuters Sans 700";
- src: url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/l?subset_id=2&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/d?subset_id=2&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/a?subset_id=2&fvd=n7&v=3") format("opentype");
- font-display: auto;
- font-style: normal;
- font-weight: 700;
+ font-family: 'Commuters Sans 700';
+ src:
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/l?subset_id=2&fvd=n7&v=3') format('woff2'),
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/d?subset_id=2&fvd=n7&v=3') format('woff'),
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/a?subset_id=2&fvd=n7&v=3') format('opentype');
+ font-display: auto;
+ font-style: normal;
+ font-weight: 700;
}
@font-face {
- font-family: "Commuters Sans 600";
- src: url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/l?subset_id=2&fvd=n7&v=3") format("woff2"), url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/d?subset_id=2&fvd=n7&v=3") format("woff"), url("https://use.typekit.net/af/857ae9/00000000000000007735c460/30/a?subset_id=2&fvd=n7&v=3") format("opentype");
- font-display: auto;
- font-style: normal;
- font-weight: 600;
+ font-family: 'Commuters Sans 600';
+ src:
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/l?subset_id=2&fvd=n7&v=3') format('woff2'),
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/d?subset_id=2&fvd=n7&v=3') format('woff'),
+ url('https://use.typekit.net/af/857ae9/00000000000000007735c460/30/a?subset_id=2&fvd=n7&v=3') format('opentype');
+ font-display: auto;
+ font-style: normal;
+ font-weight: 600;
}
@font-face {
- font-family: 'Space Mono 400';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url(https://fonts.gstatic.com/s/spacemono/v6/i7dNIFZifjKcF5UAWdDRYERMR3K_MQacbw.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+ font-family: 'Space Mono 400';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/spacemono/v6/i7dNIFZifjKcF5UAWdDRYERMR3K_MQacbw.woff2) format('woff2');
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
+ U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
- font-family: 'Space Mono 700';
- font-style: normal;
- font-weight: 700;
- src: url(https://fonts.gstatic.com/s/spacemono/v10/i7dMIFZifjKcF5UAWdDRaPpZUFWaHi6WZ3Q.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
+ font-family: 'Space Mono 700';
+ font-style: normal;
+ font-weight: 700;
+ src: url(https://fonts.gstatic.com/s/spacemono/v10/i7dMIFZifjKcF5UAWdDRaPpZUFWaHi6WZ3Q.woff2) format('woff2');
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
+ U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
- @font-face {
- font-family: 'Outfit 300';
- font-style: normal;
- font-weight: 300;
- src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4W61O4a0FQItq6fNIg.woff) format('woff');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
+@font-face {
+ font-family: 'Outfit 300';
+ font-style: normal;
+ font-weight: 300;
+ src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4W61O4a0FQItq6fNIg.woff) format('woff');
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
+ U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
@font-face {
- font-family: 'Outfit 400';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url(https://fonts.gstatic.com/s/outfit/v2/QGYyz_MVcBeNP4NjuGObqx1XmO1I4TC1O4a0FQItq6fNIg.woff) format('woff');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+ font-family: 'Outfit 400';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(https://fonts.gstatic.com/s/outfit/v2/QGYyz_MVcBeNP4NjuGObqx1XmO1I4TC1O4a0FQItq6fNIg.woff) format('woff');
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
+ U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
- font-family: 'Outfit 600';
- font-style: normal;
- font-weight: 600;
- src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4e6yO4a0FQItq6fNIg.woff) format('woff');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
\ No newline at end of file
+ font-family: 'Outfit 600';
+ font-style: normal;
+ font-weight: 600;
+ src: url(https://fonts.gstatic.com/s/outfit/v4/QGYyz_MVcBeNP4NjuGObqx1XmO1I4e6yO4a0FQItq6fNIg.woff) format('woff');
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
+ U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
diff --git a/pull_request_template.md b/pull_request_template.md
deleted file mode 100644
index ceb04880..00000000
--- a/pull_request_template.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# What was the ticket?
-
-WT-65 UI Design: Construct JSX page to match the UI of Teams landing page.
- [Link to Ticket](https://generatenu.atlassian.net/jira/software/projects/WT/boards/2?selectedIssue=WT-65)
-
-# What did I do?
-
-Created new Teams page with route at /teams, based off the figma design for it. Currently waiting for images to populate
-the rest of the page, and works to be completed on the figma for an expanded view of each of the teams
-
-# How did I test it?
-
-Describe in detail steps you used to test the changes you have made.
-Key Parts
-
-Compared the figma and current page to ensure it correctly reflected what the design should be. Ran tests for resizing the window to ensure page
-did not ahve any scaling issues.
-
- Required checks:
-
-- [Y] Did you conduct a self-review?
-- [NA] Have you written unit or integration tests?
-
-# What could go wrong in the future? What parts of your code should the reviewer pay the most attention to?
-
-Describe aspects of the PR that may become problems in the future.
-Key Questions
-
-Currently the page doesn't go anywhere, it is mainly jsut a simple gray space to build onto morechanges as figma designs are updated
-
-# Additional comments for the reviewers
-
-[!image](./public/images/PRImages/Screenshot%202023-03-20%20at%208.15.02%20PM.png)
-
-
-
diff --git a/sanity/package.json b/sanity/package.json
index f2cc3fbc..5728a4eb 100644
--- a/sanity/package.json
+++ b/sanity/package.json
@@ -1,9 +1,12 @@
{
"name": "generate-sanity",
- "private": true,
"version": "1.0.0",
- "main": "package.json",
+ "private": true,
+ "keywords": [
+ "sanity"
+ ],
"license": "UNLICENSED",
+ "main": "package.json",
"scripts": {
"dev": "sanity dev",
"start": "sanity start",
@@ -12,9 +15,6 @@
"deploy-graphql": "sanity graphql deploy",
"typecheck": "tsc"
},
- "keywords": [
- "sanity"
- ],
"dependencies": {
"@sanity/cli": "^8.2.1",
"@sanity/color-input": "^6.1.4",
@@ -32,9 +32,9 @@
"typescript": "^7.0.2"
},
"prettier": {
- "semi": false,
- "printWidth": 100,
"bracketSpacing": false,
+ "printWidth": 100,
+ "semi": false,
"singleQuote": true
}
}
diff --git a/src/component/ApplyPage/Position/index.tsx b/src/component/ApplyPage/Position/index.tsx
index 527f312d..ac12a930 100644
--- a/src/component/ApplyPage/Position/index.tsx
+++ b/src/component/ApplyPage/Position/index.tsx
@@ -5,6 +5,7 @@ import Row from 'react-bootstrap/Row';
import { useParams } from 'react-router-dom';
import applicationsByTeams from '../../../data/ApplyData/allApps';
+import type { Position as PositionData } from '../../../data/ApplyData/types';
import './style.css';
import useWebsite from '../../../shared/useWebsite';
import NavBar from '../../NavBar';
@@ -12,9 +13,186 @@ import ShadowedButton from '../../ShadowedButton';
type ApplicationGroup = keyof typeof applicationsByTeams;
+type PositionViewProps = {
+ position: PositionData;
+ showText: string;
+ onApply: () => void;
+ onShare: () => void;
+ routeIndex?: string;
+};
+
const isApplicationGroup = (value: string | undefined): value is ApplicationGroup =>
value !== undefined && Object.hasOwn(applicationsByTeams, value);
+const parseList = (stringList: string) => {
+ if (stringList) {
+ return stringList.split('.');
+ } else {
+ return [];
+ }
+};
+
+function DesktopPositionSummary({ position, showText, onApply, onShare }: PositionViewProps) {
+ return (
+
+
+
+ {position.positionTitle}
+ {position.categoryType}
+
+
+
+
+ {(position.active && (
+
+ )) ||
+ (!position.active && (
+ undefined}
+ />
+ ))}
+
+
+
+
+
+ );
+}
+
+function DesktopPositionDetails({ position, routeIndex }: PositionViewProps) {
+ return (
+
+
+ < -- positions
+
+
+ {position.description}
+
+ {position.responsibilities && What you’ll do }
+
+ {parseList(position.responsibilities).map((info, itemIndex) => (
+
+ {info}
+
+ ))}
+
+
+ {position.requirements && Requirements }
+
+ {parseList(position.requirements).map((info, itemIndex) => (
+ {info}
+ ))}
+
+
+
+
+ Duration
+
+ {position.startDate} to {position.endDate}
+
+
+
+ Weekly commitment
+ {`Up to ${position.workCommitment} hours`}
+
+
+
+
+
+ {position.remarks}
+
+
+
+
+ learn more -- >
+
+
+ );
+}
+
+function DesktopPosition(props: PositionViewProps) {
+ return (
+
+
+
+
+
+
+
+ );
+}
+
+function MobilePosition({ position, onApply, onShare }: PositionViewProps) {
+ return (
+
+
+
+
+
+
{position.positionTitle}
+
{position.categoryType}
+
+
+ {'apply now'}
+
+
+ {'share'}
+
+
+
+
+
+ < -- positions
+
+
{position.description}
+
What you'll do
+
+ {parseList(position.responsibilities).map((info, itemIndex) => (
+
+ {info}
+
+ ))}
+
+
Requirements
+
+ {parseList(position.requirements).map((info, itemIndex) => (
+
+ {info}
+
+ ))}
+
+
+
+
Duration
+
+ {position.startDate} to {position.endDate}
+
+
+
+
Weekly Commitment
+
{`Up to ${position.workCommitment} hours`}
+
+
+
{position.remarks}
+
+ learn more -- >
+
+
+
+ );
+}
+
export default function Position() {
const isWebsite = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
@@ -28,18 +206,11 @@ export default function Position() {
const [showText, setShowText] = useState('Share');
- const parseList = (stringList: string) => {
- if (stringList) {
- return stringList.split('.');
- } else {
- return [];
- }
- };
-
const copyShareLink = () => {
- console.log(window.location.href);
- navigator.clipboard.writeText(window.location.href);
- setShowText('Copied!');
+ navigator.clipboard.writeText(window.location.href).then(
+ () => setShowText('Copied!'),
+ () => setShowText('Copy failed')
+ );
};
const handleApply = () => {
@@ -50,160 +221,15 @@ export default function Position() {
if (position) {
return !mobile ? (
-
-
- {/* Left */}
-
-
-
- {position.positionTitle}
- {position.categoryType}
-
-
-
-
- {(position.active && (
-
- )) ||
- (!position.active && (
- console.log('not implemented')}
- />
- ))}
-
-
-
-
-
-
- {/* Right */}
-
- {/* Link back to list of positions */}
-
- < -- positions
-
-
- {/* Position summary */}
- {position.description}
-
- {/* Position responsibilities */}
- {position.responsibilities && What you’ll do }
-
- {parseList(position.responsibilities).map((info, index) => (
-
- {info}
-
- ))}
-
-
- {/* Position qualifications */}
- {position.requirements && Requirements }
-
- {parseList(position.requirements).map((info, index) => (
- {info}
- ))}
-
-
- {/* Position timeline */}
-
-
- Duration
-
- {position.startDate} to {position.endDate}
-
-
-
- Weekly commitment
- {`Up to ${position.workCommitment} hours`}
-
-
-
-
-
- {position.remarks}
-
-
-
- {/* Link to information about position type */}
-
- learn more -- >
-
-
-
-
+
) : (
-
-
-
-
-
-
{position.positionTitle}
-
{position.categoryType}
-
-
- {'apply now'}
-
-
- {'share'}
-
-
-
-
-
- < -- positions
-
-
{position.description}
-
What you'll do
-
- {parseList(position.responsibilities).map((info, index) => (
-
- {info}
-
- ))}
-
-
Requirements
-
- {parseList(position.requirements).map((info, index) => (
-
- {info}
-
- ))}
-
-
-
-
Duration
-
- {position.startDate} to {position.endDate}
-
-
-
-
Weekly Commitment
-
{`Up to ${position.workCommitment} hours`}
-
-
-
{position.remarks}
-
- learn more -- >
-
-
-
+
);
} else {
return null;
diff --git a/src/component/CulturePage/Events3/style.css b/src/component/CulturePage/Events3/style.css
index 339cc7f9..d1a4c5ce 100644
--- a/src/component/CulturePage/Events3/style.css
+++ b/src/component/CulturePage/Events3/style.css
@@ -1,5 +1,5 @@
.all-hands-title {
- font-family: "Space Mono 700";
+ font-family: 'Space Mono 700';
font-style: normal;
font-size: 48px;
margin-top: 200px;
@@ -20,9 +20,7 @@
column-gap: 100px;
}
-
.all-hands-div {
width: 400px;
margin: 0 50px 0 50px;
}
-
diff --git a/src/component/CulturePage/IntroImages/index.tsx b/src/component/CulturePage/IntroImages/index.tsx
index 7e029a30..2fb252e3 100644
--- a/src/component/CulturePage/IntroImages/index.tsx
+++ b/src/component/CulturePage/IntroImages/index.tsx
@@ -25,7 +25,7 @@ const desktopContent = () => {
const mobileContent = () => {
return (
-
HAVE SOME FUN WITH US
+
HAVE SOME FUN WITH US
diff --git a/src/component/CulturePage/IntroImages/style.css b/src/component/CulturePage/IntroImages/style.css
index e2e65b28..5fc63d0d 100644
--- a/src/component/CulturePage/IntroImages/style.css
+++ b/src/component/CulturePage/IntroImages/style.css
@@ -43,6 +43,7 @@
color: white;
font-size: 9.25vw;
font-family: 'Space Mono 700';
+ line-height: inherit;
transform: rotate(90deg);
margin-top: 55%;
margin-left: 16%;
diff --git a/src/component/CulturePage/IntroSection/index.tsx b/src/component/CulturePage/IntroSection/index.tsx
index 38aeaea0..aaa337a3 100644
--- a/src/component/CulturePage/IntroSection/index.tsx
+++ b/src/component/CulturePage/IntroSection/index.tsx
@@ -33,8 +33,8 @@ const mobileContent = () => (
-
Our Culture
-
We make wicked projects & plan wicked events
+
Our Culture
+
We make wicked projects & plan wicked events
>
diff --git a/src/component/CulturePage/Showcase/style.css b/src/component/CulturePage/Showcase/style.css
index f9843df9..bd03112f 100644
--- a/src/component/CulturePage/Showcase/style.css
+++ b/src/component/CulturePage/Showcase/style.css
@@ -1,10 +1,10 @@
.showcase-div {
- width: 400px;
- margin: 0 50px 0 50px;
- }
+ width: 400px;
+ margin: 0 50px 0 50px;
+}
- .showcase-title {
- font-family: "Space Mono 700";
+.showcase-title {
+ font-family: 'Space Mono 700';
font-style: normal;
font-size: 48px;
margin-top: 335px;
@@ -16,14 +16,13 @@
.showcase-text {
width: 400px;
color: black;
- font-size: 20px;
+ font-size: 20px;
line-height: 30px;
text-align: left;
font-style: normal;
font-weight: 300;
column-gap: 100px;
}
- .showcase {
- margin-right:5%;
- }
-
+.showcase {
+ margin-right: 5%;
+}
diff --git a/src/component/CulturePage/index.tsx b/src/component/CulturePage/index.tsx
index 0ccf1292..c383c7e1 100644
--- a/src/component/CulturePage/index.tsx
+++ b/src/component/CulturePage/index.tsx
@@ -23,21 +23,23 @@ export default function CulturePage() {
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
const mobile = !isBigScreen || !isWebsite;
- const children = [
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- mobile ? undefined : ,
- mobile ? undefined : ,
- ,
- ,
- ,
- ];
+ const children = (
+ <>
+
+
+
+
+
+
+
+
+ {!mobile && }
+ {!mobile && }
+
+
+
+ >
+ );
return !mobile ? (
{children}
diff --git a/src/component/DesktopMobileHandler/HorizontalDesktopContainer.tsx b/src/component/DesktopMobileHandler/HorizontalDesktopContainer.tsx
index b5613f14..d5c29c63 100644
--- a/src/component/DesktopMobileHandler/HorizontalDesktopContainer.tsx
+++ b/src/component/DesktopMobileHandler/HorizontalDesktopContainer.tsx
@@ -29,7 +29,7 @@ export default function HorizontalDesktopContainer({
desktopBGColor,
...props
}: HorizontalDesktopContainerProps) {
- const scrollContainerRef = useRef(null);
+ const scrollContainerRef = useRef(null);
useEffect(() => {
const scrollContainer = scrollContainerRef.current;
@@ -52,18 +52,17 @@ export default function HorizontalDesktopContainer({
return (
<>
- {/* Desktop view */}
-
- {/* The content is wrapped in a Row component from the react-bootstrap library to ensure proper layout */}
{children}
-
+
>
);
}
diff --git a/src/component/DesktopMobileHandler/NewMobileContainer.tsx b/src/component/DesktopMobileHandler/NewMobileContainer.tsx
index c85d3d8c..4d002ee3 100644
--- a/src/component/DesktopMobileHandler/NewMobileContainer.tsx
+++ b/src/component/DesktopMobileHandler/NewMobileContainer.tsx
@@ -26,9 +26,7 @@ type NewMobileContainerProps = {
export default function NewMobileContainer({ children, mobileBGColor, ...props }: NewMobileContainerProps) {
return (
<>
- {/* Mobile view */}
- {/* The content is wrapped in a Column component from the react-bootstrap library to ensure proper layout */}
{children}
>
diff --git a/src/component/Footer/FooterLink.tsx b/src/component/Footer/FooterLink.tsx
new file mode 100644
index 00000000..6d4c00cb
--- /dev/null
+++ b/src/component/Footer/FooterLink.tsx
@@ -0,0 +1,33 @@
+import type { FooterPage } from './pages';
+
+type FooterLinkProps = {
+ page: FooterPage;
+ currentPage: string;
+};
+
+const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
+ const { name, link, disabled } = page;
+ const isCurrentPage = currentPage === link;
+
+ return (
+
+ );
+};
+
+export default FooterLink;
diff --git a/src/component/Footer/HorizontalFooter/index.tsx b/src/component/Footer/HorizontalFooter/index.tsx
index 9772a33a..0d969a04 100644
--- a/src/component/Footer/HorizontalFooter/index.tsx
+++ b/src/component/Footer/HorizontalFooter/index.tsx
@@ -3,11 +3,12 @@ import React from 'react';
import '../style.css';
import { useNavigate } from 'react-router-dom';
-import { FooterLink } from '..';
-import { pages } from '..';
import GenerateLogo from '../../../assets/images/landingpage-v2/footerlogo.svg'; //"../../assets/images/landingpage-v2/footerlogo.svg";
import ShadowedButton from '../../ShadowedButton';
-import { SocialIcon, socialIcons } from '../../SocialIcon';
+import { SocialIcon } from '../../SocialIcon';
+import { socialIcons } from '../../socialIcons';
+import FooterLink from '../FooterLink';
+import { pages } from '../pages';
function HorizontalFooter() {
const navigate = useNavigate();
@@ -15,7 +16,7 @@ function HorizontalFooter() {
const handleOnClick = () => {
window.scrollTo(0, 0);
- navigate('/');
+ void navigate('/');
};
return (
diff --git a/src/component/Footer/VerticalFooter/index.tsx b/src/component/Footer/VerticalFooter/index.tsx
index 5fa6df56..25248f14 100644
--- a/src/component/Footer/VerticalFooter/index.tsx
+++ b/src/component/Footer/VerticalFooter/index.tsx
@@ -5,8 +5,10 @@ import { useNavigate } from 'react-router-dom';
import GenerateLogo from '../../../assets/images/landingpage-v2/footerlogo.svg';
import ShadowedButton from '../../ShadowedButton';
-import { SocialIcon, socialIcons } from '../../SocialIcon';
-import { pages, FooterLink } from '../index';
+import { SocialIcon } from '../../SocialIcon';
+import { socialIcons } from '../../socialIcons';
+import FooterLink from '../FooterLink';
+import { pages } from '../pages';
function VerticalFooter() {
const currentPageUrl = window.location.href;
@@ -14,7 +16,7 @@ function VerticalFooter() {
const handleOnClick = () => {
window.scrollTo(0, 0);
- navigate('/');
+ void navigate('/');
};
return (
@@ -48,9 +50,9 @@ function VerticalFooter() {
{socialIcons.map((si, index) => (
-
+
{si.map(s => (
-
+
))}
))}
diff --git a/src/component/Footer/index.tsx b/src/component/Footer/index.tsx
index 2a366f30..677b140a 100644
--- a/src/component/Footer/index.tsx
+++ b/src/component/Footer/index.tsx
@@ -4,52 +4,6 @@ import useWebsite from '../../shared/useWebsite';
import HorizontalFooter from './HorizontalFooter';
import VerticalFooter from './VerticalFooter';
-type FooterPage = {
- name: string;
- link: string;
- disabled?: boolean;
-};
-
-type FooterLinkProps = {
- page: FooterPage;
- currentPage: string;
-};
-
-export const pages: FooterPage[] = [
- // { name: 'Generate', link: '/' },
- { name: 'Apply', link: '/apply' },
- { name: 'About', link: '/' },
- // { name: 'Culture', link: '/culture' },
- // { name: 'Teams', link: '/teams' },
- // { name: "People", link: "/", disabled: true },
- { name: 'Projects', link: '/projects' },
-];
-
-export const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
- const { name, link, disabled } = page;
- const isCurrentPage = currentPage === link;
-
- return (
-
- );
-};
-
function Footer() {
const website = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
diff --git a/src/component/Footer/pages.ts b/src/component/Footer/pages.ts
new file mode 100644
index 00000000..5487242d
--- /dev/null
+++ b/src/component/Footer/pages.ts
@@ -0,0 +1,15 @@
+export type FooterPage = {
+ name: string;
+ link: string;
+ disabled?: boolean;
+};
+
+export const pages: FooterPage[] = [
+ // { name: 'Generate', link: '/' },
+ { name: 'Apply', link: '/apply' },
+ { name: 'About', link: '/' },
+ // { name: 'Culture', link: '/culture' },
+ // { name: 'Teams', link: '/teams' },
+ // { name: "People", link: "/", disabled: true },
+ { name: 'Projects', link: '/projects' },
+];
diff --git a/src/component/Footer/style.css b/src/component/Footer/style.css
index 674b0c6c..5cff82bb 100644
--- a/src/component/Footer/style.css
+++ b/src/component/Footer/style.css
@@ -1,236 +1,236 @@
a {
- text-decoration: none;
- color: #ffffff;
+ text-decoration: none;
+ color: #ffffff;
}
.vert-top-level-contaner {
- height: 100vh;
- background-color: #187dff;
- padding-left: 5vw;
- padding-right: 5vw;
- width: fit-content;
+ height: 100vh;
+ background-color: #187dff;
+ padding-left: 5vw;
+ padding-right: 5vw;
+ width: fit-content;
}
.vert-logo-placement {
- width: 12vh;
- height: 15vh;
+ width: 12vh;
+ height: 15vh;
}
.footer-link-bold {
- font-weight: 500;
- color: #ffffff;
- white-space: nowrap;
- max-height: 30px;
- font-size: 2vh;
+ font-weight: 500;
+ color: #ffffff;
+ white-space: nowrap;
+ max-height: 30px;
+ font-size: 2vh;
}
.footer-link-bold:hover {
- color: #187dff;
+ color: #187dff;
}
.footer-link-text {
- color: #ffffff;
- font-weight: 400;
- white-space: nowrap;
- max-height: 30vh;
- font-size: 2vh;
- font-family: 'Space Mono';
+ color: #ffffff;
+ font-weight: 400;
+ white-space: nowrap;
+ max-height: 30vh;
+ font-size: 2vh;
+ font-family: 'Space Mono';
}
.footer-link-text:hover {
- color: #187dff;
+ color: #187dff;
}
a:hover {
- -webkit-text-stroke: 0.5px white;
+ -webkit-text-stroke: 0.5px white;
}
.vert-sherm {
- /* margin-top: 25%; */
- display: flex;
- margin-top: 5vh;
- flex-direction: row;
- justify-content: center;
- margin-left: 0%;
+ /* margin-top: 25%; */
+ display: flex;
+ margin-top: 5vh;
+ flex-direction: row;
+ justify-content: center;
+ margin-left: 0%;
}
.vert-sherm-placement {
- display: flex;
- margin-top: 5vh;
- flex-direction: row;
- justify-content: center;
+ display: flex;
+ margin-top: 5vh;
+ flex-direction: row;
+ justify-content: center;
}
.footer-container-mobile {
- background-color: #187dff;
- text-align: left;
- padding-left: 15vw;
- padding-top: 5vh;
- padding-right: 15vw;
- padding-bottom: 5vh;
- width: 100vw;
- margin: 0;
- height: auto;
+ background-color: #187dff;
+ text-align: left;
+ padding-left: 15vw;
+ padding-top: 5vh;
+ padding-right: 15vw;
+ padding-bottom: 5vh;
+ width: 100vw;
+ margin: 0;
+ height: auto;
}
.footer-text {
- height: 30px;
- font-family: 'Space Mono';
- font-style: normal;
- font-weight: 400;
- font-size: 40px;
- line-height: 30px;
- color: #ffffff;
- padding-left: 15%;
- margin: 5%;
+ height: 30px;
+ font-family: 'Space Mono';
+ font-style: normal;
+ font-weight: 400;
+ font-size: 40px;
+ line-height: 30px;
+ color: #ffffff;
+ padding-left: 15%;
+ margin: 5%;
}
.hor-footer-links {
- display: flex;
- flex-direction: column;
- margin-top: auto;
+ display: flex;
+ flex-direction: column;
+ margin-top: auto;
}
.sherm {
- padding: 5%;
- margin-top: 0;
+ padding: 5%;
+ margin-top: 0;
}
.logo-placement {
- width: 14vh;
- height: 18vh;
+ width: 14vh;
+ height: 18vh;
}
.hor-social-icons {
- margin-top: auto;
- display: flex;
- flex-direction: column-reverse;
+ margin-top: auto;
+ display: flex;
+ flex-direction: column-reverse;
}
.rectangle {
- display: inline-block;
- width: 100px;
- height: 100px;
- background: black;
+ display: inline-block;
+ width: 100px;
+ height: 100px;
+ background: black;
}
.rectangleLogo {
- margin-left: 50px;
- margin-top: 20px;
- width: 90px;
- height: 90px;
- background: black;
+ margin-left: 50px;
+ margin-top: 20px;
+ width: 90px;
+ height: 90px;
+ background: black;
}
.footer-container-mobile {
- background-color: #187dff;
- text-align: left;
- padding-left: 15vw;
- padding-top: 5vh;
- padding-right: 15vw;
- padding-bottom: 5vh;
- width: 100vw;
- margin: 0;
- height: auto;
+ background-color: #187dff;
+ text-align: left;
+ padding-left: 15vw;
+ padding-top: 5vh;
+ padding-right: 15vw;
+ padding-bottom: 5vh;
+ width: 100vw;
+ margin: 0;
+ height: auto;
}
.links-container {
- height: 80vh;
- display: flex;
- flex-direction: column;
+ height: 80vh;
+ display: flex;
+ flex-direction: column;
}
.mobile-links-container {
- width: 80vw;
- display: flex;
- flex-direction: row;
+ width: 80vw;
+ display: flex;
+ flex-direction: row;
}
.social-icon-row {
- display: flex;
- flex-direction: row;
- padding-bottom: 3vh;
+ display: flex;
+ flex-direction: row;
+ padding-bottom: 3vh;
}
.mobile-social-icon-row {
- display: flex;
- flex-direction: row;
- padding-bottom: 3vh;
- height: 6vh;
+ display: flex;
+ flex-direction: row;
+ padding-bottom: 3vh;
+ height: 6vh;
}
.mobile-social-icon-col {
- margin-right: 4vh;
+ margin-right: 4vh;
}
.social-icons-align {
- margin-top: auto;
+ margin-top: auto;
}
@media (max-device-width: 650px) {
- .social-media {
- width: 6vw;
- height: 8vw;
- }
+ .social-media {
+ width: 6vw;
+ height: 8vw;
+ }
}
.mobile-social-icons-align {
- display: flex;
- flex-direction: column-reverse;
- margin-left: auto;
- margin-top: 2vh;
+ display: flex;
+ flex-direction: column-reverse;
+ margin-left: auto;
+ margin-top: 2vh;
}
.pages-align {
- margin-top: 5vh;
+ margin-top: 5vh;
}
.footer-padding {
- padding-top: 1vh;
+ padding-top: 1vh;
}
@media screen and (max-height: 450px) {
- .links-container {
- height: 80vh;
- display: flex;
- flex-direction: row;
- }
- .social-icons-align {
- margin-top: 0;
- }
- .footer-padding {
- padding-top: 0vh;
- }
- .social-icon-row {
- display: flex;
- flex-direction: row;
- }
- .pages-align {
- margin-top: 0;
- margin-right: 2vw;
- }
- .footer-link-bold {
- font-weight: 600;
- color: #ffffff;
- white-space: nowrap;
- max-height: 30px;
- font-size: 4vh;
- }
- .footer-link-text {
- color: #ffffff;
- font-weight: 400;
- white-space: nowrap;
- max-height: 30px;
- font-size: 4vh;
- font-family: 'Space Mono';
- }
- .mobile-social-icon-col {
- margin-right: 4vh;
- }
- .mobile-social-icon-row {
- display: flex;
- flex-direction: row;
- padding-bottom: 3vh;
- height: 12vh;
- }
-}
\ No newline at end of file
+ .links-container {
+ height: 80vh;
+ display: flex;
+ flex-direction: row;
+ }
+ .social-icons-align {
+ margin-top: 0;
+ }
+ .footer-padding {
+ padding-top: 0vh;
+ }
+ .social-icon-row {
+ display: flex;
+ flex-direction: row;
+ }
+ .pages-align {
+ margin-top: 0;
+ margin-right: 2vw;
+ }
+ .footer-link-bold {
+ font-weight: 600;
+ color: #ffffff;
+ white-space: nowrap;
+ max-height: 30px;
+ font-size: 4vh;
+ }
+ .footer-link-text {
+ color: #ffffff;
+ font-weight: 400;
+ white-space: nowrap;
+ max-height: 30px;
+ font-size: 4vh;
+ font-family: 'Space Mono';
+ }
+ .mobile-social-icon-col {
+ margin-right: 4vh;
+ }
+ .mobile-social-icon-row {
+ display: flex;
+ flex-direction: row;
+ padding-bottom: 3vh;
+ height: 12vh;
+ }
+}
diff --git a/src/component/LandingPage/PopupAd/index.tsx b/src/component/LandingPage/PopupAd/index.tsx
index 4f4b98be..a2cacb1f 100644
--- a/src/component/LandingPage/PopupAd/index.tsx
+++ b/src/component/LandingPage/PopupAd/index.tsx
@@ -49,9 +49,15 @@ function PopupAd({
return (
-
e.stopPropagation()}>
+
e.stopPropagation()}
+ >
{showCloseButton && }
{children}
diff --git a/src/component/NavBar/index.tsx b/src/component/NavBar/index.tsx
index bc02ff23..2c029f97 100644
--- a/src/component/NavBar/index.tsx
+++ b/src/component/NavBar/index.tsx
@@ -1,11 +1,10 @@
import React from 'react';
-import { useNavigate } from 'react-router-dom';
+import { Link } from 'react-router-dom';
import './style.css';
import GenerateLogo from '../../assets/images/landingpage/affiliateorgintros/Generate Logo_Nav.png';
const NavBar = () => {
- const navigate = useNavigate();
const currentUrl = window.location.href.split('/').at(-1);
return (
@@ -14,36 +13,34 @@ const NavBar = () => {
id="nav-contents"
className={`bg-light px-4 p-2 mb-5 d-flex bar-size justify-content-around align-items-center w-100 gap-4 items-center`}
>
-
navigate('/')}
- alt="Generate Logo"
- />
+
+
+
{currentUrl !== 'home' && (
-
navigate('/')}
- >
- About
-
+
+
+ About
+
+
)}
{currentUrl !== 'apply' && (
-
navigate('/apply')}
- >
- Apply
-
+
+
+ Apply
+
+
)}
{currentUrl !== 'projects' && (
-
navigate('/projects')}
- >
- Projects
-
+
+
+ Projects
+
+
)}
diff --git a/src/component/NavBar/style.css b/src/component/NavBar/style.css
index c2b911ed..e3b7df71 100644
--- a/src/component/NavBar/style.css
+++ b/src/component/NavBar/style.css
@@ -12,7 +12,7 @@ span {
#nav-contents {
border: 1px black solid;
- box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
+ box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
#gen-nav-logo {
diff --git a/src/component/ProjectsPage/AllProjects/AllProjects.tsx b/src/component/ProjectsPage/AllProjects/AllProjects.tsx
index b11db658..d9f88035 100644
--- a/src/component/ProjectsPage/AllProjects/AllProjects.tsx
+++ b/src/component/ProjectsPage/AllProjects/AllProjects.tsx
@@ -1,6 +1,5 @@
import './style.css';
import { useState } from 'react';
-import type { JSX } from 'react';
import Alia from '../../../assets/images/projectspage/alia.svg';
import Arctic from '../../../assets/images/projectspage/arctic.svg';
@@ -8,6 +7,7 @@ import AutoPasser from '../../../assets/images/projectspage/autopasser.svg';
import HotDate from '../../../assets/images/projectspage/hotdate.svg';
import Jurni from '../../../assets/images/projectspage/jurni.svg';
import ShowNxt from '../../../assets/images/projectspage/shownxt.svg';
+import toPairs from '../../../shared/toPairs';
import Project from './Project/Project';
import type { ProjectTeam } from './Project/Project';
@@ -82,31 +82,14 @@ export default function AllProjects() {
);
const generateGrid = () => {
- const grid: JSX.Element[] = [];
const filteredProjects = projects.filter(p => dataFiltered.includes(p.name));
- for (let i = 0; i < filteredProjects.length; i += 2) {
- grid.push(
-
-
- {i + 1 < filteredProjects.length ? (
-
- ) : (
-
- )}
-
- );
- }
-
- return grid;
+ return toPairs(filteredProjects).map(([first, second]) => (
+
+ ));
};
return (
diff --git a/src/component/ProjectsPage/AllProjects/Project/Project.tsx b/src/component/ProjectsPage/AllProjects/Project/Project.tsx
index acdcbf04..ee3c66a1 100644
--- a/src/component/ProjectsPage/AllProjects/Project/Project.tsx
+++ b/src/component/ProjectsPage/AllProjects/Project/Project.tsx
@@ -26,7 +26,7 @@ export default function Project({ name, image, teams }: ProjectProps) {
{teams.map(team => {
- return
;
+ return
;
})}
diff --git a/src/component/ProjectsPage/FeaturedProjects/FeaturedProjects.tsx b/src/component/ProjectsPage/FeaturedProjects/FeaturedProjects.tsx
index 1963cd91..ae2c031b 100644
--- a/src/component/ProjectsPage/FeaturedProjects/FeaturedProjects.tsx
+++ b/src/component/ProjectsPage/FeaturedProjects/FeaturedProjects.tsx
@@ -15,16 +15,20 @@ type FeaturedProjectsViewProps = {
};
export default function FeaturedProjects() {
- const [currentProject, setCurrentProject] = useState(Projects[0]);
+ const [currentIndex, setCurrentIndex] = useState(0);
+ const currentProject = Projects[currentIndex];
const isWebsite = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
const mobile = !isBigScreen || !isWebsite;
const handleProject = (dir: number) => {
- const currentIndex = Projects.indexOf(currentProject);
- setCurrentProject(Projects[(currentIndex + dir + Projects.length) % Projects.length]);
+ setCurrentIndex((currentIndex + dir + Projects.length) % Projects.length);
};
+ if (!currentProject) {
+ return null;
+ }
+
return (
diff --git a/src/component/ProjectsPage/index.tsx b/src/component/ProjectsPage/index.tsx
index 294acced..4cc8ae50 100644
--- a/src/component/ProjectsPage/index.tsx
+++ b/src/component/ProjectsPage/index.tsx
@@ -13,11 +13,18 @@ export default function ProjectsPage() {
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
const mobile = !isBigScreen || !isWebsite;
- const children = [
,
,
,
];
+ const children = (
+ <>
+
+
+
+
+ >
+ );
return !mobile ? (
-
+
{children}
) : (
-
+
{children}
);
}
diff --git a/src/component/ScrollToTop.tsx b/src/component/ScrollToTop.tsx
index ef938a0c..c860ef7b 100644
--- a/src/component/ScrollToTop.tsx
+++ b/src/component/ScrollToTop.tsx
@@ -1,15 +1,20 @@
import { useEffect } from 'react';
import { NavigationType, useLocation, useNavigationType } from 'react-router-dom';
-export default function ScrollToTop() {
- const { pathname } = useLocation();
+function ScrollOnNavigation() {
const navigationType = useNavigationType();
useEffect(() => {
if (navigationType !== NavigationType.Pop) {
window.scrollTo(0, 0);
}
- }, [pathname, navigationType]);
+ }, [navigationType]);
return null;
}
+
+export default function ScrollToTop() {
+ const { pathname } = useLocation();
+
+ return
;
+}
diff --git a/src/component/ShadowedButton/index.tsx b/src/component/ShadowedButton/index.tsx
index e2e21a96..b58757a2 100644
--- a/src/component/ShadowedButton/index.tsx
+++ b/src/component/ShadowedButton/index.tsx
@@ -17,20 +17,21 @@ type ShadowedButtonProps = {
className?: string;
};
+const isConstantKey = (key: string): key is keyof typeof constants => Object.hasOwn(constants, key);
+
export default function ShadowedButton(props: ShadowedButtonProps) {
const ButtonStyle = {
backgroundColor: props.fillColor,
padding: `${props.yPad || '1rem'} ${props.xPad}`,
- fontSize: `${props.fontSize || '1.5vw'}`,
+ fontSize: props.fontSize || '1.5vw',
};
const handleOnClick = () => {
- // SAFETY: only runs when onClick is missing, and every caller passes onClick
- const name = props.lnk as string;
- const key = name.replace(' ', '_');
- const POSITIONS_URL = 'Position_' + key;
- // SAFETY: same unused fallback path as above
- window.location.assign(constants[POSITIONS_URL as keyof typeof constants]);
+ const positionKey = `Position_${(props.lnk ?? '').replace(' ', '_')}`;
+
+ if (isConstantKey(positionKey)) {
+ window.location.assign(constants[positionKey]);
+ }
};
return (
diff --git a/src/component/ShadowedButton/style.css b/src/component/ShadowedButton/style.css
index 6371f430..a4dc0e49 100644
--- a/src/component/ShadowedButton/style.css
+++ b/src/component/ShadowedButton/style.css
@@ -1,11 +1,11 @@
.button-style {
- font-family: 'Space Mono';
- color: black;
- box-shadow: -0.5rem 0.6rem black;
+ font-family: 'Space Mono';
+ color: black;
+ box-shadow: -0.5rem 0.6rem black;
}
.button-style-right {
- font-family: 'Space Mono';
- color: black;
- box-shadow: 1rem 1rem black;
-}
\ No newline at end of file
+ font-family: 'Space Mono';
+ color: black;
+ box-shadow: 1rem 1rem black;
+}
diff --git a/src/component/SocialIcon.tsx b/src/component/SocialIcon.tsx
index 5034b7b0..db711bfd 100644
--- a/src/component/SocialIcon.tsx
+++ b/src/component/SocialIcon.tsx
@@ -1,60 +1,13 @@
import type { FunctionComponent, SVGProps } from 'react';
import { Col } from 'react-bootstrap';
-import FbIcon from '../assets/images/socialMediaIcons/Facebook.svg?react';
-import InstaIcon from '../assets/images/socialMediaIcons/Insta.svg?react';
-import LinkedInIcon from '../assets/images/socialMediaIcons/Linkedin.svg?react';
-import MosaicIcon from '../assets/images/socialMediaIcons/Mosaic.svg?react';
-import NortheasternIcon from '../assets/images/socialMediaIcons/Northeaster.svg?react';
-import Sherm from '../assets/images/socialMediaIcons/Sherm.svg?react';
-import YoutubeIcon from '../assets/images/socialMediaIcons/Youtube.svg?react';
-
type SocialIconProps = {
href: string;
imgSrc: FunctionComponent
>;
className?: string;
};
-export const socialIcons = [
- [
- {
- href: 'https://www.instagram.com/generatenu/',
- imgSrc: InstaIcon,
- },
- ],
- [
- {
- href: 'https://www.youtube.com/channel/UC2Y_rgZiPKPH0lSU1FyQJFw/featured',
- imgSrc: YoutubeIcon,
- },
- {
- href: 'https://coe.northeastern.edu/orgs/generate/',
- imgSrc: NortheasternIcon,
- },
- ],
- [
- {
- href: 'https://www.linkedin.com/company/generate-product-development/mycompany/',
- imgSrc: LinkedInIcon,
- },
- {
- href: 'https://entrepreneurship.northeastern.edu/mosaic/',
- imgSrc: MosaicIcon,
- },
- ],
- [
- {
- href: 'https://www.facebook.com/GenerateNU/',
- imgSrc: FbIcon,
- },
- {
- href: 'https://sherman.center.northeastern.edu/',
- imgSrc: Sherm,
- },
- ],
-];
-
-export function SocialIcon({ href, imgSrc, className }: SocialIconProps) {
+export function SocialIcon({ href, className }: SocialIconProps) {
// const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches
// const mobile = !isBigScreen
return (
diff --git a/src/component/readme.md b/src/component/readme.md
index 63188263..0f5e4b37 100644
--- a/src/component/readme.md
+++ b/src/component/readme.md
@@ -1,6 +1,6 @@
-The landing page is broken up into different sections within tag elements all within one
+The landing page is broken up into different sections within
tag elements all within one
The first component is the screen of the homepage that contains the image, Generate text, and what Generate is description each within their own
inside of one entire
for this first component.
The second component is the "our teams" section that contains a bootstrap container that holds the 6 team boxes.
The third component is the "our community" component with a
element containing the text, another
element containing the image all within one
-Finally, the fourth component is the apply section with the respective student and client sides in each of their own
.
-Styling for specific things, such as font and text styling, are done in the jsx document, and some other ones, such as borders and boxes, and title texts are done in the css document.
+Finally, the fourth component is the apply section with the respective student and client sides in each of their own
.
+Styling for specific things, such as font and text styling, are done in the jsx document, and some other ones, such as borders and boxes, and title texts are done in the css document.
diff --git a/src/component/socialIcons.ts b/src/component/socialIcons.ts
new file mode 100644
index 00000000..9c6d673e
--- /dev/null
+++ b/src/component/socialIcons.ts
@@ -0,0 +1,46 @@
+import FbIcon from '../assets/images/socialMediaIcons/Facebook.svg?react';
+import InstaIcon from '../assets/images/socialMediaIcons/Insta.svg?react';
+import LinkedInIcon from '../assets/images/socialMediaIcons/Linkedin.svg?react';
+import MosaicIcon from '../assets/images/socialMediaIcons/Mosaic.svg?react';
+import NortheasternIcon from '../assets/images/socialMediaIcons/Northeaster.svg?react';
+import Sherm from '../assets/images/socialMediaIcons/Sherm.svg?react';
+import YoutubeIcon from '../assets/images/socialMediaIcons/Youtube.svg?react';
+
+export const socialIcons = [
+ [
+ {
+ href: 'https://www.instagram.com/generatenu/',
+ imgSrc: InstaIcon,
+ },
+ ],
+ [
+ {
+ href: 'https://www.youtube.com/channel/UC2Y_rgZiPKPH0lSU1FyQJFw/featured',
+ imgSrc: YoutubeIcon,
+ },
+ {
+ href: 'https://coe.northeastern.edu/orgs/generate/',
+ imgSrc: NortheasternIcon,
+ },
+ ],
+ [
+ {
+ href: 'https://www.linkedin.com/company/generate-product-development/mycompany/',
+ imgSrc: LinkedInIcon,
+ },
+ {
+ href: 'https://entrepreneurship.northeastern.edu/mosaic/',
+ imgSrc: MosaicIcon,
+ },
+ ],
+ [
+ {
+ href: 'https://www.facebook.com/GenerateNU/',
+ imgSrc: FbIcon,
+ },
+ {
+ href: 'https://sherman.center.northeastern.edu/',
+ imgSrc: Sherm,
+ },
+ ],
+];
diff --git a/src/pages/ApplyPageV2/RoleCategory/style.css b/src/pages/ApplyPageV2/RoleCategory/style.css
index 13bfc0c4..8e0c6a2b 100644
--- a/src/pages/ApplyPageV2/RoleCategory/style.css
+++ b/src/pages/ApplyPageV2/RoleCategory/style.css
@@ -1,23 +1,23 @@
-.link-column-container{
- display: flex;
- flex: 1;
- flex-direction: row;
- margin-top: 2vh;
- margin-bottom: 2vh;
+.link-column-container {
+ display: flex;
+ flex: 1;
+ flex-direction: row;
+ margin-top: 2vh;
+ margin-bottom: 2vh;
}
.link-column {
- display: flex;
- flex: 1;
- flex-direction: column;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
}
.link-text {
- font-family: Outfit;
- font-size: 1em;
- font-style: normal;
- font-weight: 500;
- line-height: 200%;
- text-decoration-line: underline;
- margin-bottom: 10px;
-}
\ No newline at end of file
+ font-family: Outfit;
+ font-size: 1em;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 200%;
+ text-decoration-line: underline;
+ margin-bottom: 10px;
+}
diff --git a/src/pages/ApplyPageV2/Tag/style.css b/src/pages/ApplyPageV2/Tag/style.css
index 77fa4bcd..f91e66aa 100644
--- a/src/pages/ApplyPageV2/Tag/style.css
+++ b/src/pages/ApplyPageV2/Tag/style.css
@@ -1,14 +1,14 @@
.tag-container {
- display: flex;
- height: 2rem;
- padding: 4px 7px;
- max-width: fit-content;
- align-items: center;
- background: #FFF;
+ display: flex;
+ height: 2rem;
+ padding: 4px 7px;
+ max-width: fit-content;
+ align-items: center;
+ background: #fff;
}
.tag-text {
- color: black;
- font-size: 1em;
- font-family: "Outfit";
-}
\ No newline at end of file
+ color: black;
+ font-size: 1em;
+ font-family: 'Outfit';
+}
diff --git a/src/pages/ApplyPageV2/TeamApplicationCard/index.tsx b/src/pages/ApplyPageV2/TeamApplicationCard/index.tsx
index 4e8ec2b7..f98b353e 100644
--- a/src/pages/ApplyPageV2/TeamApplicationCard/index.tsx
+++ b/src/pages/ApplyPageV2/TeamApplicationCard/index.tsx
@@ -6,29 +6,159 @@ import WhiteUpArrow from '../../../assets/images/applypage-v2/WhiteUpArrow.svg?r
import RoleCategory from '../RoleCategory';
import Tag from '../Tag';
import './style.css';
-import type { ApplyTeam } from '../types';
+import type { ApplicationRole, ApplyTeam } from '../types';
type TeamApplicationCardProps = {
team: ApplyTeam;
};
+type CategoryNames = {
+ engagement: string;
+ operations: string;
+ fallback: string;
+};
+
+type TeamRolesProps = {
+ team: ApplyTeam;
+};
+
+type TeamCardHeaderProps = {
+ team: ApplyTeam;
+ clientCard: boolean;
+};
+
+type ExternalLinkButtonProps = {
+ team: ApplyTeam;
+ clientCard: boolean;
+};
+
+const viewRoles = 'View Roles';
+
+const workWithUs = 'Work with Us';
+
+const meetTheTeam = 'Meet the team';
+
+const getActiveRoles = (roles: ApplicationRole[] | null | undefined) =>
+ (roles ?? []).filter(role => role.activeApplication === true && role.applicationLink);
+
+const getCategoryName = (teamName: string, names: CategoryNames) => {
+ if (teamName === 'Engagement') {
+ return names.engagement;
+ }
+
+ if (teamName === 'Operations') {
+ return names.operations;
+ }
+
+ return names.fallback;
+};
+
+function NoOpenRoles() {
+ return (
+
+ There are not currently any open roles in this branch. New openings are typically posted before each
+ semester. Please check back later, or follow{' '}
+
+ @generatenu
+ {' '}
+ on Instagram to be alerted of new openings.
+ >
+ ),
+ }}
+ />
+ );
+}
+
+function TeamRoles({ team }: TeamRolesProps) {
+ const activeContributors = getActiveRoles(team.contributorRoles);
+ const activeLeads = getActiveRoles(team.leadRoles);
+ const activeChiefs = getActiveRoles(team.chiefRoles);
+
+ return (
+ <>
+ {activeContributors.length === 0 && activeLeads.length === 0 && activeChiefs.length === 0 && }
+ {activeContributors.length > 0 && (
+
+ )}
+ {activeLeads.length > 0 && (
+
+ )}
+ {activeChiefs.length > 0 && (
+
+ )}
+ >
+ );
+}
+
+function TeamCardHeader({ team, clientCard }: TeamCardHeaderProps) {
+ return (
+
+
+ {team.team}
+
+
{team.tags ? team.tags.map(tag => ) : null}
+
+ {team.teamDescription}
+
+
+ );
+}
+
+function ExternalLinkButton({ team, clientCard }: ExternalLinkButtonProps) {
+ return (
+
+
+
+
+ {clientCard ? workWithUs : meetTheTeam}
+
+
+
+ );
+}
+
export default function TeamApplicationCard({ team }: TeamApplicationCardProps) {
const [expanded, setExpanded] = useState(false);
const expand = team.externalLink === undefined;
const clientCard = team.team === 'Clients';
- const viewRoles = 'View Roles';
- const workWithUs = 'Work with Us';
- const meetTheTeam = 'Meet the team';
-
- const activeContributors =
- team.contributorRoles &&
- team.contributorRoles.filter(role => role.activeApplication === true && role.applicationLink);
-
- const activeLeads =
- team.leadRoles && team.leadRoles.filter(role => role.activeApplication === true && role.applicationLink);
-
- const activeChiefs =
- team.chiefRoles && team.chiefRoles.filter(role => role.activeApplication === true && role.applicationLink);
return (
-
-
- {team.team}
-
-
{team.tags ? team.tags.map(tag => ) : null}
-
- {team.teamDescription}
-
-
+
{expand ? (
setExpanded(!expanded)}>
@@ -52,82 +174,11 @@ export default function TeamApplicationCard({ team }: TeamApplicationCardProps)
{viewRoles}
- {expanded &&
- (activeContributors ?? []).length === 0 &&
- (activeLeads ?? []).length === 0 &&
- (activeChiefs ?? []).length === 0 && (
-
- There are not currently any open roles in this branch. New openings are typically posted before
- each semester. Please check back later, or follow{' '}
-
- @generatenu
- {' '}
- on Instagram to be alerted of new openings.
- >
- ),
- }}
- />
- )}
- {expanded && activeContributors && activeContributors.length > 0 && (
-
- )}
- {expanded && activeLeads && activeLeads.length > 0 && (
-
- )}
- {expanded && activeChiefs && activeChiefs.length > 0 && (
-
- )}
+ {expanded && }
) : (
-
-
-
-
- {clientCard ? workWithUs : meetTheTeam}
-
-
-
+
)}
);
diff --git a/src/pages/ApplyPageV2/TeamApplicationCard/style.css b/src/pages/ApplyPageV2/TeamApplicationCard/style.css
index e2f7d483..f49921af 100644
--- a/src/pages/ApplyPageV2/TeamApplicationCard/style.css
+++ b/src/pages/ApplyPageV2/TeamApplicationCard/style.css
@@ -71,7 +71,6 @@
text-transform: uppercase;
}
-
.team-subheader {
color: white;
font-family: 'Space Mono 700';
@@ -84,5 +83,5 @@
.paragraph {
color: black;
font-size: 1em;
- font-family: "Outfit";
-}
\ No newline at end of file
+ font-family: 'Outfit';
+}
diff --git a/src/pages/ApplyPageV2/index.tsx b/src/pages/ApplyPageV2/index.tsx
index 24776bd4..afeaa2a4 100644
--- a/src/pages/ApplyPageV2/index.tsx
+++ b/src/pages/ApplyPageV2/index.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useMemo } from 'react';
import NavBar from '../../component/NavBar';
import { useSanity } from '../../services/useSanity';
@@ -82,13 +82,15 @@ export default function ApplyPage() {
}
}| order(zIndex desc)`;
- const teams = useSanity(query, {}, data =>
- data
- ? data.map(team => ({
- ...team,
- color: team.color.hex,
- }))
- : []
+ const sanityTeams = useSanity(query);
+
+ const teams: ApplyTeam[] = useMemo(
+ () =>
+ sanityTeams.map(team => ({
+ ...team,
+ color: team.color.hex,
+ })),
+ [sanityTeams]
);
const halfLength = Math.ceil(teams.length / 2);
diff --git a/src/pages/ApplyPageV2/style.css b/src/pages/ApplyPageV2/style.css
index 73c84270..2e6d0b85 100644
--- a/src/pages/ApplyPageV2/style.css
+++ b/src/pages/ApplyPageV2/style.css
@@ -1,55 +1,55 @@
.join-header {
- margin-top: 4rem;
- color: #FFF;
- font-family: 'Space Mono 700';
- font-size: 10vw;
- line-height: 80%;
- text-transform: uppercase;
- margin-left: 2vw;
- margin-bottom: 2vh;
+ margin-top: 4rem;
+ color: #fff;
+ font-family: 'Space Mono 700';
+ font-size: 10vw;
+ line-height: 80%;
+ text-transform: uppercase;
+ margin-left: 2vw;
+ margin-bottom: 2vh;
}
.join-text {
- color: #FFF;
- font-family: "Outfit";
- font-size: 1.25em;
- width: 90vw;
- margin-left: 2vw;
- margin-bottom: 1vh;
+ color: #fff;
+ font-family: 'Outfit';
+ font-size: 1.25em;
+ width: 90vw;
+ margin-left: 2vw;
+ margin-bottom: 1vh;
}
.column-container {
- display: grid;
- grid-template-columns: 1fr;
- margin: 3vw;
- padding-bottom: 10vh;
- justify-content: center;
+ display: grid;
+ grid-template-columns: 1fr;
+ margin: 3vw;
+ padding-bottom: 10vh;
+ justify-content: center;
}
@media (min-width: 900px) {
- .column-container {
- grid-template-columns: 1fr 1fr;
- }
+ .column-container {
+ grid-template-columns: 1fr 1fr;
+ }
}
.left-column {
- display: flex;
- flex: 1;
- flex-direction: column;
- margin-right: 3vh;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ margin-right: 3vh;
}
.right-column {
- display: flex;
- flex: 1;
- flex-direction: column;
- margin-left: 3vh;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ margin-left: 3vh;
}
.mobile-column {
- display: flex;
- flex: 1;
- flex-direction: column;
- margin-left: 5vw;
- margin-right: 2vw;
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ margin-left: 5vw;
+ margin-right: 2vw;
}
diff --git a/src/pages/LandingPageV3/CelebrateOurWins/index.tsx b/src/pages/LandingPageV3/CelebrateOurWins/index.tsx
index da52a0b1..85c43a6b 100644
--- a/src/pages/LandingPageV3/CelebrateOurWins/index.tsx
+++ b/src/pages/LandingPageV3/CelebrateOurWins/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect } from 'react';
+import React, { useMemo, useState } from 'react';
import NextArrow from '../../../assets/icons/arrows/nextArrowRight.svg?react';
import PrevArrow from '../../../assets/icons/arrows/prevArrowLeft.svg?react';
@@ -11,59 +11,69 @@ import { urlFor } from '../../../client';
import { useSanity } from '../../../services/useSanity';
import type { Copy, SanityShowcase, Showcase } from '../types';
+type ShowcaseLabelProps = {
+ showcase: Showcase;
+};
+
+const compareShowcases = (a: Showcase, b: Showcase) => {
+ if (a.year === b.year) {
+ return a.semester === 'SPRING' ? -1 : 1;
+ }
+
+ return Number(a.year) - Number(b.year);
+};
+
+function ShowcaseLabel({ showcase }: ShowcaseLabelProps) {
+ return (
+ <>
+
+
+ {showcase.semester.toUpperCase()}
+
+
SHOWCASE
+
+
+
+ {showcase.year[0]}
+ {showcase.year[1]}
+
+ {showcase.year[2]}
+ {showcase.year[3]}
+
+ {showcase.year}
+ >
+ );
+}
+
export default function CelebrateOurWins() {
const copyQuery = `*[_type == "copy" && key == "celebrate-our-wins"]{header, content}`;
const copy = useSanity(copyQuery);
const showcaseQuery = `*[_type == "showcase"] {year, image, semester} | order(year asc)`;
- const showcases = useSanity(showcaseQuery, {}, data =>
- data
- ? data
- .map(showcase => ({
- ...showcase,
- semester: showcase.semester.toUpperCase(),
- image: urlFor(showcase.image).url(),
- }))
- .sort((a, b) => {
- if (a.year === b.year) {
- return a.semester === 'SPRING' ? -1 : 1;
- }
-
- return Number(a.year) - Number(b.year);
- })
- : []
- );
+ const sanityShowcases = useSanity(showcaseQuery);
- const [selectedShowcase, setSelectedShowcase] = useState>(
- showcases && showcases.length !== 0 ? showcases[showcases.length - 1] : {}
- );
+ const showcases: Showcase[] = useMemo(() => {
+ const sortedShowcases = sanityShowcases.map(showcase => ({
+ ...showcase,
+ semester: showcase.semester.toUpperCase(),
+ image: urlFor(showcase.image).url(),
+ }));
+
+ sortedShowcases.sort(compareShowcases);
+
+ return sortedShowcases;
+ }, [sanityShowcases]);
- useEffect(() => {
- setSelectedShowcase(showcases && showcases.length !== 0 ? showcases[showcases.length - 1] : {});
- }, [showcases]);
+ const [selectedIndex, setSelectedIndex] = useState(null);
+ const currentIndex = selectedIndex ?? showcases.length - 1;
+ const selectedShowcase = showcases[currentIndex];
const handleLeftButtonClick = () => {
- const currentIndex = showcases.findIndex(
- showcase => showcase.year === selectedShowcase.year && showcase.semester === selectedShowcase.semester
- );
-
- if (currentIndex > 0) {
- setSelectedShowcase(showcases[currentIndex - 1]);
- } else {
- setSelectedShowcase(showcases.at(-1) ?? {});
- }
+ setSelectedIndex(currentIndex > 0 ? currentIndex - 1 : showcases.length - 1);
};
const handleRightButtonClick = () => {
- const currentIndex = showcases.findIndex(
- showcase => showcase.year === selectedShowcase.year && showcase.semester === selectedShowcase.semester
- );
-
- if (currentIndex < showcases.length - 1) {
- setSelectedShowcase(showcases[currentIndex + 1]);
- } else {
- setSelectedShowcase(showcases.at(0) ?? {});
- }
+ setSelectedIndex(currentIndex < showcases.length - 1 ? currentIndex + 1 : 0);
};
return (
@@ -72,12 +82,12 @@ export default function CelebrateOurWins() {
-
{copy && copy[0] && copy[0].content[0]}
+
{copy[0]?.content[0]}
@@ -88,30 +98,12 @@ export default function CelebrateOurWins() {
- {selectedShowcase.semester && selectedShowcase.year && (
- <>
-
-
- {selectedShowcase.semester.toUpperCase()}
-
-
SHOWCASE
-
-
-
- {selectedShowcase.year[0]}
- {selectedShowcase.year[1]}
-
- {selectedShowcase.year[2]}
- {selectedShowcase.year[3]}
-
-
{selectedShowcase.year}
- >
- )}
+ {selectedShowcase &&
}
diff --git a/src/pages/LandingPageV3/ChooseYourCharacter/Mascot.tsx b/src/pages/LandingPageV3/ChooseYourCharacter/Mascot.tsx
index 0c722f72..a9255d94 100644
--- a/src/pages/LandingPageV3/ChooseYourCharacter/Mascot.tsx
+++ b/src/pages/LandingPageV3/ChooseYourCharacter/Mascot.tsx
@@ -14,7 +14,6 @@ type MascotProps = SVGProps & {
function Mascot({ color = '#FFFFFF', ...props }: MascotProps) {
return (
- {/* Body */}
- {/* Hand */}
- {/* Shadow */}
- {/* Legs */}
- {/* BODY | This must be at the bottom to cover sections of the shadow */}
{
return (
- {directors &&
- directors.map((director, index) => (
-
- ))}
+ {directors.map((director, index) => (
+
+ ))}
);
};
const ArcadeMachineWrapper = ({ directors, directorToTeam, coloredIndex }: ArcadeMachineWrapperProps) => {
- if (!directors[coloredIndex]?.name) {
+ const director = directors[coloredIndex];
+
+ if (!director?.name) {
return <>>;
}
- const currentTeam = directorToTeam.get(directors[coloredIndex].name);
+ const currentTeam = directorToTeam.get(director.name);
- return (
- <>
- {directors && directorToTeam && directors[coloredIndex] && (
-
- )}
- >
- );
+ return ;
};
export default function ChooseYourCharacter() {
const directorsQuery = `*[_type == "director"] | order(zIndex)`;
const branchQuery = `*[_type == "team"] {team,team_abbreviation,color,zIndex} | order(zIndex)`;
- const directors = useSanity(directorsQuery, {}, data =>
- data
- ? data.map(director => ({
- ...director,
- color: director.color.hex,
- image: urlFor(director.image).url(),
- }))
- : []
+ const sanityDirectors = useSanity(directorsQuery);
+
+ const directors: Director[] = useMemo(
+ () =>
+ sanityDirectors.map(director => ({
+ ...director,
+ color: director.color.hex,
+ image: urlFor(director.image).url(),
+ })),
+ [sanityDirectors]
);
- const branches = useSanity(branchQuery, {}, data =>
- data
- ? data.map(branch => ({
- ...branch,
- team: branch.team.toUpperCase(),
- teamAbbreviation: (branch.team_abbreviation || '').toUpperCase(),
- }))
- : []
+ const sanityBranches = useSanity(branchQuery);
+
+ const branches: Branch[] = useMemo(
+ () =>
+ sanityBranches.map(branch => ({
+ ...branch,
+ team: branch.team.toUpperCase(),
+ teamAbbreviation: (branch.team_abbreviation || '').toUpperCase(),
+ })),
+ [sanityBranches]
);
- useEffect(() => {
- if (branches.length === 0 || directors.length === 0) {
- return;
- } else {
- const newDirectorMapping = new Map(
- directors.map(director => {
- const branch = branches.find(branch => branch.team.toUpperCase() === director.team.toUpperCase());
+ const [coloredIndex, setSelected] = useState(0);
- return [director.name, branch];
- })
- );
+ const directorToTeam = new Map(
+ directors.map(director => {
+ const branch = branches.find(candidate => candidate.team.toUpperCase() === director.team.toUpperCase());
- setDirectorToTeam(newDirectorMapping);
- }
- }, [branches, directors]);
+ return [director.name, branch];
+ })
+ );
- const [coloredIndex, setSelected] = useState(0);
- let [directorToTeam, setDirectorToTeam] = useState(new Map());
+ const selectedDirector = directors[coloredIndex];
const handleSelect = (index: number) => {
setSelected(index);
@@ -134,8 +122,8 @@ export default function ChooseYourCharacter() {
- {directors && directors[coloredIndex] && (
-
+ {selectedDirector && (
+
)}
diff --git a/src/pages/LandingPageV3/Footer/FooterLink.tsx b/src/pages/LandingPageV3/Footer/FooterLink.tsx
new file mode 100644
index 00000000..208aa1ae
--- /dev/null
+++ b/src/pages/LandingPageV3/Footer/FooterLink.tsx
@@ -0,0 +1,33 @@
+import type { FooterPage } from './pages';
+
+type FooterLinkProps = {
+ page: FooterPage;
+ currentPage: string;
+};
+
+const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
+ const { name, link, disabled } = page;
+ const isCurrentPage = currentPage === link;
+
+ return (
+
+ );
+};
+
+export default FooterLink;
diff --git a/src/pages/LandingPageV3/Footer/MobileFooter.tsx b/src/pages/LandingPageV3/Footer/MobileFooter.tsx
index 2ec38e6b..46e49d9d 100644
--- a/src/pages/LandingPageV3/Footer/MobileFooter.tsx
+++ b/src/pages/LandingPageV3/Footer/MobileFooter.tsx
@@ -1,13 +1,13 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
-import { FooterLink } from '.';
-import { pages } from '.';
import UpArrowMobile from '../../../assets/icons/arrows/upArrowMobile.svg';
import Email from '../../../assets/icons/socials/Email.svg?react';
import Instagram from '../../../assets/icons/socials/Instagram.svg?react';
import LinkedIn from '../../../assets/icons/socials/LinkedIn.svg?react';
import ShadowedButton from '../../../component/ShadowedButton';
+import FooterLink from './FooterLink';
+import { pages } from './pages';
function MobileFooter() {
const navigate = useNavigate();
@@ -15,7 +15,7 @@ function MobileFooter() {
const handleOnClick = () => {
window.scrollTo(0, 0);
- navigate('/');
+ void navigate('/');
};
const icons = [
diff --git a/src/pages/LandingPageV3/Footer/WebFooter.tsx b/src/pages/LandingPageV3/Footer/WebFooter.tsx
index b77ad792..d00e9295 100644
--- a/src/pages/LandingPageV3/Footer/WebFooter.tsx
+++ b/src/pages/LandingPageV3/Footer/WebFooter.tsx
@@ -1,21 +1,21 @@
import React from 'react';
-import { FooterLink } from '.';
-import { pages } from '.';
import UpArrow from '../../../assets/icons/arrows/upArrow.svg';
import Email from '../../../assets/icons/socials/Email.svg?react';
import Instagram from '../../../assets/icons/socials/Instagram.svg?react';
import LinkedIn from '../../../assets/icons/socials/LinkedIn.svg?react';
import GenerateLogo from '../../../assets/images/landingpage-v2/footerlogo.svg'; //"../../assets/images/landingpage-v2/footerlogo.svg";
import ShadowedButton from '../../../component/ShadowedButton';
+import FooterLink from './FooterLink';
+import { pages } from './pages';
+
+const handleOnClick = () => {
+ window.scrollTo(0, 0);
+};
function WebFooter() {
const currentPageUrl = window.location.href;
- const handleOnClick = () => {
- window.scrollTo(0, 0);
- };
-
const icons = [
{
name: 'Instagram',
diff --git a/src/pages/LandingPageV3/Footer/index.tsx b/src/pages/LandingPageV3/Footer/index.tsx
index aa674b05..c674dd80 100644
--- a/src/pages/LandingPageV3/Footer/index.tsx
+++ b/src/pages/LandingPageV3/Footer/index.tsx
@@ -4,48 +4,6 @@ import useWebsite from '../../../shared/useWebsite';
import MobileFooter from './MobileFooter';
import WebFooter from './WebFooter';
-type FooterPage = {
- name: string;
- link: string;
- disabled?: boolean;
-};
-
-type FooterLinkProps = {
- page: FooterPage;
- currentPage: string;
-};
-
-export const pages: FooterPage[] = [
- { name: 'About', link: '/about' },
- { name: 'Projects', link: '/projects' },
- { name: 'Apply', link: '/apply' },
-];
-
-export const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
- const { name, link, disabled } = page;
- const isCurrentPage = currentPage === link;
-
- return (
-
- );
-};
-
function Footer() {
const website = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
diff --git a/src/pages/LandingPageV3/Footer/pages.ts b/src/pages/LandingPageV3/Footer/pages.ts
new file mode 100644
index 00000000..ac631467
--- /dev/null
+++ b/src/pages/LandingPageV3/Footer/pages.ts
@@ -0,0 +1,11 @@
+export type FooterPage = {
+ name: string;
+ link: string;
+ disabled?: boolean;
+};
+
+export const pages: FooterPage[] = [
+ { name: 'About', link: '/about' },
+ { name: 'Projects', link: '/projects' },
+ { name: 'Apply', link: '/apply' },
+];
diff --git a/src/pages/LandingPageV3/HowWereStructured/index.tsx b/src/pages/LandingPageV3/HowWereStructured/index.tsx
index 37854781..716a320a 100644
--- a/src/pages/LandingPageV3/HowWereStructured/index.tsx
+++ b/src/pages/LandingPageV3/HowWereStructured/index.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from 'react';
+import React, { useMemo, useState } from 'react';
import { urlFor } from '../../../client';
import { useSanity } from '../../../services/useSanity';
@@ -17,6 +17,14 @@ const IMAGE_SIZE = 15;
const SELECTED_SHIFT = 7;
+function pointAt(angle: number, radius: number) {
+ const rad = (angle * Math.PI) / 180;
+ const x = 50 + radius * Math.sin(rad);
+ const y = 50 - radius * Math.cos(rad);
+
+ return `${x.toFixed(3)}% ${y.toFixed(3)}%`;
+}
+
/**
* Dynamically generates a circular "slice" shaped path (an annular sector /
* donut segment) based on the index of the element and the total number of
@@ -29,14 +37,6 @@ function sliceClipPath(index: number, total: number) {
const startAngle = (index - 0.5) * sliceAngle;
const endAngle = (index + 0.5) * sliceAngle;
- const pointAt = (angle: number, radius: number) => {
- const rad = (angle * Math.PI) / 180;
- const x = 50 + radius * Math.sin(rad);
- const y = 50 - radius * Math.cos(rad);
-
- return `${x.toFixed(3)}% ${y.toFixed(3)}%`;
- };
-
const points: string[] = [];
// Outer arc: sweep from the start angle to the end angle.
@@ -93,83 +93,77 @@ export default function HowWereStrctured() {
const teamQuery = `*[_type == "team" && team != "Clients"] {team, image, teamDescription, zIndex, color} | order(zIndex)`;
- const teams = useSanity
(teamQuery, {}, data =>
- data
- ? data.map(value => ({
- ...value,
- image: urlFor(value.image).url(),
- }))
- : []
- );
+ const sanityTeams = useSanity(teamQuery);
- const [selected, setSelected] = useState>({});
+ const teams: StructuredTeam[] = useMemo(
+ () =>
+ sanityTeams.map(value => ({
+ ...value,
+ image: urlFor(value.image).url(),
+ })),
+ [sanityTeams]
+ );
- useEffect(() => {
- if (teams.length > 0) {
- const randomIndex = Math.floor(Math.random() * teams.length);
- setSelected(teams[randomIndex]);
- }
- }, [teams]);
+ const [randomSeed] = useState(() => Math.random());
+ const [hovered, setHovered] = useState(null);
+ const randomTeam = teams[Math.floor(randomSeed * teams.length)];
+ const selected = hovered ?? randomTeam;
const handleSelect = (teamData: StructuredTeam) => {
- setSelected(teamData);
+ setHovered(teamData);
};
return (
-
{copy && copy[0] && copy[0].header}
-
{copy && copy[0] && copy[0].content[0]}
+
{copy[0]?.header}
+
{copy[0]?.content[0]}
- {teams &&
- teams[0] &&
- teams.map((team, index) => (
-
(
+
+ ))}
+ {teams.map((team, index) => {
+ const isSelected = selected?.team === team.team;
+
+ return (
+
- ))}
- {teams &&
- teams[0] &&
- teams.map((team, index) => {
- const isSelected = selected.team === team.team;
-
- return (
-
handleSelect(team)}
+ >
+ handleSelect(team)}
- >
-
-
- );
- })}
+ />
+
+ );
+ })}
-
{selected.team}
-
{selected.teamDescription}
+
{selected?.team}
+
{selected?.teamDescription}
diff --git a/src/pages/LandingPageV3/WeAre/index.tsx b/src/pages/LandingPageV3/WeAre/index.tsx
index 2525ef2e..49049053 100644
--- a/src/pages/LandingPageV3/WeAre/index.tsx
+++ b/src/pages/LandingPageV3/WeAre/index.tsx
@@ -17,19 +17,19 @@ export default function WeAre() {
- {values && values[0] && values[0].value}
+ {values[0]?.value}
- {values && values[1] && values[1].value}
+ {values[1]?.value}
- {values && values[2] && values[2].value}
+ {values[2]?.value}
- {values && values[3] && values[3].value}
+ {values[3]?.value}
- {values && values[4] && values[4].value}
+ {values[4]?.value}
diff --git a/src/pages/LandingPageV3/WhatIsGenerate/index.tsx b/src/pages/LandingPageV3/WhatIsGenerate/index.tsx
index 8e0e52fe..70aa35f0 100644
--- a/src/pages/LandingPageV3/WhatIsGenerate/index.tsx
+++ b/src/pages/LandingPageV3/WhatIsGenerate/index.tsx
@@ -1,28 +1,30 @@
import React from 'react';
-import type { ForwardedRef } from 'react';
+import type { Ref } from 'react';
import showcase from '../../../assets/images/landingpage/weare/showcase.jpg';
import workshop from '../../../assets/images/landingpage/weare/workshop.jpg';
import { useSanity } from '../../../services/useSanity';
import type { Copy } from '../types';
-function WhatIsGenerate(_props: object, ref: ForwardedRef
) {
+type WhatIsGenerateProps = {
+ ref?: Ref;
+};
+
+export default function WhatIsGenerate({ ref }: WhatIsGenerateProps) {
const query = `*[_type == "copy" && key == "what-is-generate-landing"]{header, content}`;
const headerCopy = useSanity(query);
return (
-
{headerCopy && headerCopy[0] && headerCopy[0].header}
- {headerCopy &&
- headerCopy[0] &&
- headerCopy[0].content.map((item, index) => (
-
- {item}
-
-
-
- ))}
+
{headerCopy[0]?.header}
+ {headerCopy[0]?.content.map((item, index) => (
+
+ {item}
+
+
+
+ ))}
@@ -38,5 +40,3 @@ function WhatIsGenerate(_props: object, ref: ForwardedRef) {
);
}
-
-export default React.forwardRef(WhatIsGenerate);
diff --git a/src/pages/LandingPageV3/WhyGenerate/index.tsx b/src/pages/LandingPageV3/WhyGenerate/index.tsx
index 9ee90342..76fab716 100644
--- a/src/pages/LandingPageV3/WhyGenerate/index.tsx
+++ b/src/pages/LandingPageV3/WhyGenerate/index.tsx
@@ -18,23 +18,23 @@ export default function WhyGenerate() {
Why Generate?
-
{whyGenerate1 && whyGenerate1[0] && whyGenerate1[0].header}
+
{whyGenerate1[0]?.header}
-
{whyGenerate1 && whyGenerate1[0] && whyGenerate1[0].content[0]}
+
{whyGenerate1[0]?.content[0]}
-
{whyGenerate2 && whyGenerate2[0] && whyGenerate2[0].header}
+
{whyGenerate2[0]?.header}
-
{whyGenerate2 && whyGenerate2[0] && whyGenerate2[0].content[0]}
+
{whyGenerate2[0]?.content[0]}
-
{whyGenerate3 && whyGenerate3[0] && whyGenerate3[0].header}
+
{whyGenerate3[0]?.header}
-
{whyGenerate3 && whyGenerate3[0] && whyGenerate3[0].content[0]}
+
{whyGenerate3[0]?.content[0]}
diff --git a/src/pages/LandingPageV3/index.tsx b/src/pages/LandingPageV3/index.tsx
index f5dffd2e..280db63e 100644
--- a/src/pages/LandingPageV3/index.tsx
+++ b/src/pages/LandingPageV3/index.tsx
@@ -2,7 +2,6 @@ import { Dialog } from '@headlessui/react';
import React, { useRef } from 'react';
import { useState } from 'react';
-import ApplyTodayPopup from '../../component/LandingPage/MemberInfoSession';
import CelebrateOurWins from './CelebrateOurWins';
import ChooseYourCharacter from './ChooseYourCharacter';
import Footer from './Footer';
@@ -34,8 +33,8 @@ export default function LandingPageV3() {
height="100%"
style={{ border: 'none' }}
allow="fullscreen; payment"
+ sandbox="allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox"
aria-hidden="false"
- tabIndex={0}
>
{isOpen &&
}
diff --git a/src/pages/LandingPageV3/style.css b/src/pages/LandingPageV3/style.css
index 849263a3..44cbc0e6 100644
--- a/src/pages/LandingPageV3/style.css
+++ b/src/pages/LandingPageV3/style.css
@@ -2,20 +2,8 @@
background-color: #111111;
background-image:
linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, #111 70%),
- repeating-linear-gradient(
- to right,
- #144280 0,
- #144280 1px,
- transparent 1px,
- transparent 2.222rem
- ),
- repeating-linear-gradient(
- to bottom,
- #144280 0,
- #144280 1px,
- transparent 1px,
- transparent 2.222rem
- );
+ repeating-linear-gradient(to right, #144280 0, #144280 1px, transparent 1px, transparent 2.222rem),
+ repeating-linear-gradient(to bottom, #144280 0, #144280 1px, transparent 1px, transparent 2.222rem);
background-size:
100% 100%,
auto,
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Featured.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Featured.tsx
new file mode 100644
index 00000000..61619f0f
--- /dev/null
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Featured.tsx
@@ -0,0 +1,39 @@
+import type { Team } from '../../../../data/teams';
+import useWebsite from '../../../../shared/useWebsite';
+import FeatureTextRow from './featureTextRow';
+import { ExpandedTeamsJSON } from './JSONFiles/ExpandedTeamsJSON';
+
+type FeaturedProps = {
+ team: Team;
+};
+
+export default function Featured({ team }: FeaturedProps) {
+ const isWebsite = useWebsite();
+ const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
+ const mobile = !isBigScreen || !isWebsite;
+ const featured = ExpandedTeamsJSON[team].featured;
+
+ if (!featured) {
+ return null;
+ }
+
+ return (
+ <>
+
{featured.header}
+ {featured.items.map((value, index) => (
+
+
+
+ ))}
+ >
+ );
+}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Members.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Members.tsx
new file mode 100644
index 00000000..f5f12f6b
--- /dev/null
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Members.tsx
@@ -0,0 +1,86 @@
+import { Fragment } from 'react';
+
+import type { Team } from '../../../../data/teams';
+import toPairs from '../../../../shared/toPairs';
+import useWebsite from '../../../../shared/useWebsite';
+import { RolesJSON } from './JSONFiles/RolesJSON';
+import type { RoleGroup } from './JSONFiles/types';
+import './style.css';
+
+type MembersProps = {
+ team: Team;
+};
+
+type MembersContainerProps = {
+ role: RoleGroup;
+ mobile: boolean;
+};
+
+export default function Members({ team }: MembersProps) {
+ const isWebsite = useWebsite();
+ const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
+ const mobile = !isBigScreen || !isWebsite;
+
+ return RolesJSON[team].Roles?.map((role, roleIndex) => (
+
+
+ {role.header.toUpperCase()}
+
+
+
+ ));
+}
+
+function MembersContainer({ role, mobile }: MembersContainerProps) {
+ return (
+
+ {role.lead && (
+
+
+ {role.lead.subheader}
+
+
{role.lead.desc}
+
+ )}
+
+ {toPairs(role.members).map(([member, nextMember], pairIndex) => (
+
+
+
+ {member.subheader}
+
+
{member.desc}
+
+ {nextMember ? (
+
+
+ {nextMember.subheader}
+
+
+ {nextMember.desc}
+
+
+ ) : pairIndex !== 0 ? (
+
+ ) : null}
+
+ ))}
+
+
+ );
+}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/OurRoles.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/OurRoles.tsx
index e5bb47a7..c1700fc8 100644
--- a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/OurRoles.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/OurRoles.tsx
@@ -1,32 +1,12 @@
import type { ReactNode } from 'react';
-import type { Team } from '../../../../data/teams';
-import useWebsite from '../../../../shared/useWebsite';
-import RoleContainer from '../CommonTeam/RoleContainer';
-import { ExpandedTeamsJSON } from './JSONFiles/ExpandedTeamsJSON';
-import { RolesJSON } from './JSONFiles/RolesJSON';
import './style.css';
-import type { RoleGroup } from './JSONFiles/types';
type OurRolesProps = {
children: ReactNode;
};
-type RolesProps = {
- team: Team;
- children?: ReactNode;
-};
-
-type MembersProps = {
- team: Team;
-};
-
-type MembersContainerProps = {
- role: RoleGroup;
- mobile: boolean;
-};
-
-export function OurRoles({ children }: OurRolesProps) {
+export default function OurRoles({ children }: OurRolesProps) {
return (
OUR ROLES
@@ -34,115 +14,3 @@ export function OurRoles({ children }: OurRolesProps) {
);
}
-
-export function Roles({ team, children }: RolesProps) {
- const isWebsite = useWebsite();
- const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
- const mobile = !isBigScreen || !isWebsite;
-
- return (
-
-
-
- {children ? RolesJSON[team].Director.header.toUpperCase() : RolesJSON[team].Director.header}
-
-
- {RolesJSON[team].Director.desc}
-
-
- {children}
-
- );
-}
-
-export function Members({ team }: MembersProps) {
- const isWebsite = useWebsite();
- const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
- const mobile = !isBigScreen || !isWebsite;
-
- return (
- RolesJSON[team].Roles &&
- RolesJSON[team].Roles.map((role, index) => (
- <>
-
- {role.header.toUpperCase()}
-
-
- >
- ))
- );
-}
-
-function MembersContainer({ role, mobile }: MembersContainerProps) {
- return (
-
- {role.lead && (
-
-
- {role.lead.subheader}
-
-
{role.lead.desc}
-
- )}
-
- {role.members.map((member, index) => {
- return (
- index % 2 === 0 && (
-
-
-
- {member.subheader}
-
-
- {member.desc}
-
-
- {index + 1 < role.members.length ? (
-
-
- {role.members[index + 1].subheader}
-
-
- {role.members[index + 1].desc}
-
-
- ) : index !== 0 ? (
-
- ) : (
- <>>
- )}
-
- )
- );
- })}
-
-
- );
-}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Roles.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Roles.tsx
new file mode 100644
index 00000000..c32051d4
--- /dev/null
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/Roles.tsx
@@ -0,0 +1,46 @@
+import type { ReactNode } from 'react';
+
+import type { Team } from '../../../../data/teams';
+import useWebsite from '../../../../shared/useWebsite';
+import { ExpandedTeamsJSON } from './JSONFiles/ExpandedTeamsJSON';
+import { RolesJSON } from './JSONFiles/RolesJSON';
+import RoleContainer from './RoleContainer';
+import './style.css';
+
+type RolesProps = {
+ team: Team;
+ children?: ReactNode;
+};
+
+export default function Roles({ team, children }: RolesProps) {
+ const isWebsite = useWebsite();
+ const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
+ const mobile = !isBigScreen || !isWebsite;
+
+ return (
+
+
+
+ {children ? RolesJSON[team].Director.header.toUpperCase() : RolesJSON[team].Director.header}
+
+
+ {RolesJSON[team].Director.desc}
+
+
+ {children}
+
+ );
+}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/SocialIcons.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/SocialIcons.tsx
index 6e2bc965..79097e75 100644
--- a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/SocialIcons.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/SocialIcons.tsx
@@ -1,8 +1,9 @@
-import React from 'react';
+import React, { Fragment } from 'react';
import { Col, Row } from 'react-bootstrap';
import './footerStyle.css';
-import { SocialIcon, socialIcons } from '../../../../component/SocialIcon';
+import { SocialIcon } from '../../../../component/SocialIcon';
+import { socialIcons } from '../../../../component/socialIcons';
type SocialIconsProps = {
mobile: boolean;
@@ -13,10 +14,8 @@ export default function SocialIcons({ mobile }: SocialIconsProps) {
{socialIcons.map((row, index) => (
- {row.map((icon, index) => (
- <>
-
- >
+ {row.map(icon => (
+
))}
))}
@@ -25,11 +24,10 @@ export default function SocialIcons({ mobile }: SocialIconsProps) {
{socialIcons.map((row, index) => (
- {row.map((icon, index) => (
- <>
+ {row.map(icon => (
+
@@ -40,7 +38,7 @@ export default function SocialIcons({ mobile }: SocialIconsProps) {
*/}
) : null}
- >
+
))}
))}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/TeamPageFooter.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/TeamPageFooter.tsx
index edd00e23..328ddf35 100644
--- a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/TeamPageFooter.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/TeamPageFooter.tsx
@@ -17,7 +17,6 @@ type FooterPage = {
type FooterLinkProps = {
page: FooterPage;
- currentPage: string;
};
type TitleCardProps = {
@@ -41,21 +40,20 @@ const pages: FooterPage[] = [
{ name: 'Projects', link: '/projects' },
];
-const pagesSplit: FooterPage[][] = [
- [
- { name: 'Generate', link: '/' },
- { name: 'Apply', link: '/apply' },
- { name: 'About', link: '/about' },
- ],
- [
- { name: 'Culture', link: '/culture' },
- { name: 'Teams', link: '/teams' },
- // { name: "People", link: "/", disabled: true },
- { name: 'Projects', link: '/projects' },
- ],
+const leftColumnPages: FooterPage[] = [
+ { name: 'Generate', link: '/' },
+ { name: 'Apply', link: '/apply' },
+ { name: 'About', link: '/about' },
];
-const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
+const rightColumnPages: FooterPage[] = [
+ { name: 'Culture', link: '/culture' },
+ { name: 'Teams', link: '/teams' },
+ // { name: "People", link: "/", disabled: true },
+ { name: 'Projects', link: '/projects' },
+];
+
+const FooterLink = ({ page }: FooterLinkProps) => {
const { name, link, disabled } = page;
const currentURI = window.location.pathname.split('/').at(1);
var isCurrentPage = `/${currentURI}`.includes(link) && link !== '/';
@@ -86,7 +84,6 @@ const FooterLink = ({ page, currentPage }: FooterLinkProps) => {
};
function FooterLinks() {
- const currentPageUrl = window.location.href;
const isWebsite = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
const mobile = !isBigScreen || !isWebsite;
@@ -94,19 +91,19 @@ function FooterLinks() {
return mobile ? (
{pages.map((page, index) => (
-
+
))}
) : (
- {pagesSplit[0].map((page, index) => (
-
+ {leftColumnPages.map((page, index) => (
+
))}
- {pagesSplit[1].map((page, index) => (
-
+ {rightColumnPages.map((page, index) => (
+
))}
@@ -115,7 +112,7 @@ function FooterLinks() {
function TitleCard({ title, color, mobile }: TitleCardProps) {
return (
-
+
@@ -123,16 +120,94 @@ function TitleCard({ title, color, mobile }: TitleCardProps) {
);
}
+type FooterStartProps = {
+ mobile: boolean;
+ isBigScreen: boolean;
+ onLogoClick: () => void;
+};
+
+type FooterEndProps = {
+ mobile: boolean;
+};
+
+const handleScrollClick = () => {
+ window.scrollTo(0, 0);
+};
+
+function FooterStart({ mobile, isBigScreen, onLogoClick }: FooterStartProps) {
+ return (
+
+
+
+
+ }
+ onClick={onLogoClick}
+ />
+
+
+ {mobile ? (
+
}
+ onClick={handleScrollClick}
+ />
+ ) : (
+
+
+
+ )}
+
+ );
+}
+
+function FooterEnd({ mobile }: FooterEndProps) {
+ return (
+
+ {mobile ? (
+
+
+
+ ) : (
+
+ )}
+ {mobile ? (
+
+ ) : (
+ }
+ onClick={handleScrollClick}
+ />
+ )}
+
+ );
+}
+
function TeamPageFooter({ color, page }: TeamPageFooterProps) {
const navigate = useNavigate();
const handleOnClick = () => {
window.scrollTo(0, 0);
- navigate('/');
- };
-
- const handleScrollClick = () => {
- window.scrollTo(0, 0);
+ void navigate('/');
};
const isWebsite = useWebsite();
@@ -141,65 +216,9 @@ function TeamPageFooter({ color, page }: TeamPageFooterProps) {
return (
-
-
-
-
-
- }
- onClick={handleOnClick}
- />
-
-
- {mobile ? (
-
}
- onClick={handleScrollClick}
- />
- ) : (
-
-
-
- )}
-
-
- {mobile ? (
-
-
-
- ) : (
-
- )}
- {mobile ? (
-
- ) : (
- }
- onClick={handleScrollClick}
- />
- )}
-
+
+
+
{page &&
}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/WhatYouLearn.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/WhatYouLearn.tsx
index 4cd3b19b..b7608956 100644
--- a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/WhatYouLearn.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/WhatYouLearn.tsx
@@ -16,11 +16,11 @@ export default function TextRow({ title, description, picture, reverse }: TextRo
const mobile = !isBigScreen || !isWebsite;
return (
-
+
{(reverse || mobile) &&
}
-
-
{title}
-
{description}
+
+
{title}
+
{description}
{!reverse && !mobile &&
}
diff --git a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/featureTextRow.tsx b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/featureTextRow.tsx
index 895fd4fe..f044a32a 100644
--- a/src/pages/TeamsPage/ExpandedTeams/CommonTeam/featureTextRow.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/CommonTeam/featureTextRow.tsx
@@ -11,28 +11,47 @@ type FeatureTextRowProps = {
button: string;
};
+const desktopLayout = {
+ rowClassName: 'text-row',
+ sectionClassName: 'info-section',
+ textClassName: ' paragraph-text',
+ xPad: '5vw',
+ yPad: '2vw',
+ fontSize: '2vw',
+};
+
+const mobileLayout = {
+ rowClassName: 'text-row-mobile-feature',
+ sectionClassName: 'info-section-mobile',
+ textClassName: ' paragraph-text-mobile',
+ xPad: '4vw',
+ yPad: '3vw',
+ fontSize: '3vw',
+};
+
export default function FeatureTextRow({ description, picture, reverse, button }: FeatureTextRowProps) {
const isWebsite = useWebsite();
const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
const mobile = !isBigScreen || !isWebsite;
const navigate = useNavigate();
+ const layout = mobile ? mobileLayout : desktopLayout;
const handleOnClick = (link: string) => {
- navigate(link);
+ void navigate(link);
};
return (
-
+
{(reverse || mobile) &&
}
-
-
{description}
+
+
{description}
+
{(reverse || mobile) &&
}
-
-
{title}
-
{description}
+
+
{title}
+
{description}
{!reverse && !mobile &&
}
diff --git a/src/pages/TeamsPage/ExpandedTeams/Engagement/index.tsx b/src/pages/TeamsPage/ExpandedTeams/Engagement/index.tsx
index 26ae16b2..5b43f71e 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Engagement/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/Engagement/index.tsx
@@ -1,5 +1,7 @@
-import { Featured } from '..';
-import { Members, OurRoles, Roles } from '../CommonTeam/OurRoles';
+import Featured from '../CommonTeam/Featured';
+import Members from '../CommonTeam/Members';
+import OurRoles from '../CommonTeam/OurRoles';
+import Roles from '../CommonTeam/Roles';
import './style.css';
export default function EngagementContainer() {
diff --git a/src/pages/TeamsPage/ExpandedTeams/Hardware/index.tsx b/src/pages/TeamsPage/ExpandedTeams/Hardware/index.tsx
index f605e6ca..0964e13b 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Hardware/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/Hardware/index.tsx
@@ -1,7 +1,9 @@
import React from 'react';
-import { Featured } from '..';
-import { Members, OurRoles, Roles } from '../CommonTeam/OurRoles';
+import Featured from '../CommonTeam/Featured';
+import Members from '../CommonTeam/Members';
+import OurRoles from '../CommonTeam/OurRoles';
+import Roles from '../CommonTeam/Roles';
import './style.css';
import { WhatYouLearnContainer } from '../CommonTeam/WhatYouLearnContainer';
diff --git a/src/pages/TeamsPage/ExpandedTeams/Management/index.tsx b/src/pages/TeamsPage/ExpandedTeams/Management/index.tsx
index b32f81e2..8e93e6b1 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Management/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/Management/index.tsx
@@ -2,14 +2,15 @@ import React from 'react';
import './style.css';
import { TEAMS } from '../../../../data/teams';
-import { OurRoles, Roles } from '../CommonTeam/OurRoles';
+import OurRoles from '../CommonTeam/OurRoles';
+import Roles from '../CommonTeam/Roles';
export default function ManagementContainer() {
return (
{TEAMS.map(team => (
-
+
))}
diff --git a/src/pages/TeamsPage/ExpandedTeams/Management/style.css b/src/pages/TeamsPage/ExpandedTeams/Management/style.css
index 57cb71d4..c6f72eba 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Management/style.css
+++ b/src/pages/TeamsPage/ExpandedTeams/Management/style.css
@@ -88,14 +88,7 @@
height: max(76.8vw, 1100px);
/* left: 100px;
top: 1480px; */
- background: linear-gradient(
- 180deg,
- #ffbf3c 8.33%,
- #7b61ff 28.13%,
- #6fcf97 50.52%,
- #ff0000 72.92%,
- #1477f8 90.62%
- );
+ background: linear-gradient(180deg, #ffbf3c 8.33%, #7b61ff 28.13%, #6fcf97 50.52%, #ff0000 72.92%, #1477f8 90.62%);
}
.roles-title {
diff --git a/src/pages/TeamsPage/ExpandedTeams/Operations/index.tsx b/src/pages/TeamsPage/ExpandedTeams/Operations/index.tsx
index 94f79678..09171eb6 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Operations/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/Operations/index.tsx
@@ -1,4 +1,6 @@
-import { Members, OurRoles, Roles } from '../CommonTeam/OurRoles';
+import Members from '../CommonTeam/Members';
+import OurRoles from '../CommonTeam/OurRoles';
+import Roles from '../CommonTeam/Roles';
import './style.css';
export default function OperationsContainer() {
diff --git a/src/pages/TeamsPage/ExpandedTeams/Software/index.tsx b/src/pages/TeamsPage/ExpandedTeams/Software/index.tsx
index b1e15348..b03031c5 100644
--- a/src/pages/TeamsPage/ExpandedTeams/Software/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/Software/index.tsx
@@ -1,7 +1,9 @@
import React from 'react';
-import { Featured } from '..';
-import { Members, OurRoles, Roles } from '../CommonTeam/OurRoles';
+import Featured from '../CommonTeam/Featured';
+import Members from '../CommonTeam/Members';
+import OurRoles from '../CommonTeam/OurRoles';
+import Roles from '../CommonTeam/Roles';
import './style.css';
import { WhatYouLearnContainer } from '../CommonTeam/WhatYouLearnContainer';
diff --git a/src/pages/TeamsPage/ExpandedTeams/index.tsx b/src/pages/TeamsPage/ExpandedTeams/index.tsx
index 9e38e8cd..8b53852c 100644
--- a/src/pages/TeamsPage/ExpandedTeams/index.tsx
+++ b/src/pages/TeamsPage/ExpandedTeams/index.tsx
@@ -8,7 +8,6 @@ import NavBar from '../../../component/NavBar';
import { TEAMS, isTeam } from '../../../data/teams';
import type { Team } from '../../../data/teams';
import useWebsite from '../../../shared/useWebsite';
-import FeatureTextRow from './CommonTeam/featureTextRow';
import { ExpandedTeamsJSON } from './CommonTeam/JSONFiles/ExpandedTeamsJSON';
import TeamPageFooter from './CommonTeam/TeamPageFooter';
import TextRow from './CommonTeam/textRow';
@@ -112,34 +111,3 @@ function ExpandedTeamsMobileHeader({ team }: TeamProps) {
);
}
-
-export function Featured({ team }: TeamProps) {
- const isWebsite = useWebsite();
- const isBigScreen = !window.matchMedia('(max-device-width: 650px)').matches;
- const mobile = !isBigScreen || !isWebsite;
- const featured = ExpandedTeamsJSON[team].featured;
-
- if (!featured) {
- return null;
- }
-
- return (
- <>
- {featured.header}
- {featured.items.map((value, index) => (
-
-
-
- ))}
- >
- );
-}
diff --git a/src/pages/TeamsPage/TeamCard.tsx b/src/pages/TeamsPage/TeamCard.tsx
index a65e4ebc..88667033 100644
--- a/src/pages/TeamsPage/TeamCard.tsx
+++ b/src/pages/TeamsPage/TeamCard.tsx
@@ -15,7 +15,7 @@ const TeamCard = ({ color = 'black', name = 'Team', image }: TeamCardProps) => {
const mobile = !isBigScreen || !isWebsite;
return !mobile ? (
-
+
@@ -26,7 +26,7 @@ const TeamCard = ({ color = 'black', name = 'Team', image }: TeamCardProps) => {
) : (
-
+
{
- return ;
- }),
- ];
+ const teamCards = teamPageDetails.map(team => (
+
+ ));
// todo; possibly rename component
return !mobile ? (
- <>
- {children}]}
- desktopBGColor={'white'}
- />
- >
+
+ {teamCards}
+
) : (
- <>
- {[children]}]}
- mobileBGColor={'black'}
- />
- >
+
+ {teamCards}
+
);
}
diff --git a/src/pages/TeamsPage/style.css b/src/pages/TeamsPage/style.css
index ba2e216f..658d0351 100644
--- a/src/pages/TeamsPage/style.css
+++ b/src/pages/TeamsPage/style.css
@@ -1,99 +1,99 @@
.PH {
- font-size: 400px;
+ font-size: 400px;
}
.testdiv {
- width: 100vw;
- height: 100vh;
- background-color: black;
- overflow-y: scroll;
- font-size: 20vh;
+ width: 100vw;
+ height: 100vh;
+ background-color: black;
+ overflow-y: scroll;
+ font-size: 20vh;
}
.card-container-flex {
- height: 100vh;
- width: 50vh;
- display: flex;
- flex-direction: column;
- align-items: center;
+ height: 100vh;
+ width: 50vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
}
.link-wrapper {
- height: 100vh;
- width: 50vh;
- margin: 0px;
- padding: 0px;
+ height: 100vh;
+ width: 50vh;
+ margin: 0px;
+ padding: 0px;
}
.link-wrapper-mobile {
- width: 100vw;
- margin: 0px;
- padding: 0px;
+ width: 100vw;
+ margin: 0px;
+ padding: 0px;
}
.card-img {
- margin-top: 20vh;
- width: 30vh;
- height: auto;
+ margin-top: 20vh;
+ width: 30vh;
+ height: auto;
}
.card-img-mobile {
- width: 20vh;
- height: auto;
+ width: 20vh;
+ height: auto;
}
.title-bkgnd {
- background-color: black;
- width: 50vh;
- height: 10vh;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- margin-top: 10vh;
+ background-color: black;
+ width: 50vh;
+ height: 10vh;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ margin-top: 10vh;
}
.title-bkgnd-mobile {
- background-color: black;
- width: 10vh;
- height: 50vh;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- margin-top: 0%;
+ background-color: black;
+ width: 10vh;
+ height: 50vh;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ margin-top: 0%;
}
.title-text {
- font-family: 'Space Mono 700';
- font-weight: 700;
- font-size: 7.5vh;
- line-height: 5vh;
- text-transform: uppercase;
+ font-family: 'Space Mono 700';
+ font-weight: 700;
+ font-size: 7.5vh;
+ line-height: 5vh;
+ text-transform: uppercase;
}
.intro-navbar {
- position: fixed;
- z-index: 2;
- margin-left: 3%;
- padding-top: 2%;
- width: 42vh;
+ position: fixed;
+ z-index: 2;
+ margin-left: 3%;
+ padding-top: 2%;
+ width: 42vh;
}
@media (max-width: 650px) or (max-device-width: 650px) {
- .intro-navbar {
- position: fixed;
- left: 90%;
- transform: translateX(-50%);
- width: auto;
- }
+ .intro-navbar {
+ position: fixed;
+ left: 90%;
+ transform: translateX(-50%);
+ width: auto;
+ }
}
@media only screen and (max-device-width: 650px) {
- .teams-navbar {
- position: fixed;
- left: 90%;
- transform: translateX(-50%);
- width: auto;
- }
-}
\ No newline at end of file
+ .teams-navbar {
+ position: fixed;
+ left: 90%;
+ transform: translateX(-50%);
+ width: auto;
+ }
+}
diff --git a/src/services/useSanity.ts b/src/services/useSanity.ts
index 91fc3b15..987686ea 100644
--- a/src/services/useSanity.ts
+++ b/src/services/useSanity.ts
@@ -1,26 +1,16 @@
import type { QueryParams } from '@sanity/client';
-import { useState, useEffect } from 'react';
+import { useState, useEffect, useEffectEvent } from 'react';
import { client } from '../client';
-export function useSanity(query: string): T[];
-export function useSanity(query: string, params: QueryParams, modifier: (data: Raw[]) => T[]): T[];
-export function useSanity(
- query: string,
- params: QueryParams = {},
- modifier: (data: Raw[]) => (Raw | T)[] = data => data
-): (Raw | T)[] {
- const [data, setData] = useState<(Raw | T)[]>([]);
+export function useSanity(query: string, params: QueryParams = {}): T[] {
+ const [data, setData] = useState([]);
- useEffect(() => {
- const fetchData = async (): Promise => {
- const fetchedData = await client.fetch(query, params);
- const modifiedData = modifier(fetchedData);
- setData(modifiedData);
- };
+ const fetchData = useEffectEvent(() => client.fetch(query, params).then(setData));
- fetchData();
- }, [] /*, [modifier, params, query]*/);
+ useEffect(() => {
+ void fetchData();
+ }, []);
return data;
}
diff --git a/src/shared/toPairs.ts b/src/shared/toPairs.ts
new file mode 100644
index 00000000..3d920730
--- /dev/null
+++ b/src/shared/toPairs.ts
@@ -0,0 +1,3 @@
+export default function toPairs(items: T[]): [T, T | undefined][] {
+ return items.flatMap((item, index): [T, T | undefined][] => (index % 2 === 0 ? [[item, items[index + 1]]] : []));
+}
diff --git a/tsconfig.json b/tsconfig.json
index 3ae65ca5..fade7459 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,9 +6,8 @@
"moduleResolution": "bundler",
"jsx": "react-jsx",
"strict": true,
+ "noUncheckedIndexedAccess": true,
"noEmit": true,
- "allowJs": true,
- "checkJs": false,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
diff --git a/vite.config.ts b/vite.config.ts
index c7d6f03c..950638c5 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,5 +1,5 @@
-import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
+import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
export default defineConfig(() => {