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

Add failsafes in case Octokit api fails. Statically-stored most information in .json files. Change revalidation period for projects page. One issue with importing several variables and functions, where I had to manually import each from their respective file, instead of importing all from '../util'. #117

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
1 change: 1 addition & 0 deletions AllProjects.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Some small notes on how I've been writing the app so far:
* the mapping of event data to human-readable components in `components/GitHubEventAction.tsx` is manually done (and currently, manually typed). I haven't *really* looked into it, but...
* I'm sure there are ways we can use the generated types for `octokit` to flesh out the event types, instead of manually picking/resolving fields
* there may even be a way to programatically explore types and do the string generation in a much more natural way!
* most of the actual copy isn't here yet! i'm mostly just fiddling with code :)

* most of the actual copy isn't here yet! i'm mostly just fiddling with code :)
* to ensure the website doesn't break if the Octokit api fails, the information from the api calls are generated in getStaticProps() for both projects.tsx and index.tsx and stored statically in /test/fixtures
* All of ACM's projects, generated in projects.tsx, are stored in /test/fixtures/AllProjects.json, while info about Events and ACM as an org, generated in index.tsx, are stored in /test/fixtures/eventResponse.json and /test/fixtures/orgResponse.json

Want to give a quick shoutout to [Bryan Pan](https://bryanpan.co/) of [Creative Labs](https://www.creativelabsucla.com/) - he's been a big pusher of Next and a great friend to ACM!

Expand Down
3 changes: 3 additions & 0 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ function Navbar(): JSX.Element {
<Link href="/contribute">
<a>contribute</a>
</Link>
<Link href="/ucla">
<a>ucla</a>
</Link>
<Link href="https://github.com/uclaacm" passHref>
<button>GitHub</button>
</Link>
Expand Down
Loading