Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor archive #38

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Refactor archive #38

wants to merge 4 commits into from

Conversation

J164
Copy link
Contributor

@J164 J164 commented Aug 20, 2024

Adding the new year's team involves four steps:

  • Add <year>.json to /public/team/data
  • Add photos of team members to /public/team/photos/<year>/
  • Add new year to front of years array in components/Team/Team.tsx
  • Change default year in components/Team/Team.tsx to new year

@J164 J164 requested a review from AydanPirani August 20, 2024 04:30
@J164 J164 changed the title Refactor archive to scale Refactor archive and update history timeline Aug 21, 2024
@J164 J164 marked this pull request as draft August 25, 2024 19:49
@J164 J164 marked this pull request as ready for review August 30, 2024 23:49
@J164 J164 changed the title Refactor archive and update history timeline Refactor archive Sep 4, 2024
Comment on lines +26 to +34
useEffect(() => {
const fetchTeamData = async () => {
const response = await fetch(`/team/data/${year}.json`);
const data = await response.json();
setTeam(data);
};

fetchTeamData();
}, [year]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be fixed by importing json

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import staffInfo from '../info/staff-info.json';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want one large json file that contains the staff info for every year then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants