-
Notifications
You must be signed in to change notification settings - Fork 200
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
Upgrade to Astro v5 and preact #1153
base: main
Are you sure you want to change the base?
Conversation
@@ -6,7 +6,8 @@ const CONTRIBUTORS = []; | |||
const fetchContributors = async (page) => { | |||
const response = await fetch(`${CONTRIBUTORS_URL}?page=${page}`); | |||
const contributors = await response.json(); | |||
CONTRIBUTORS.push(...contributors); | |||
if (Array.isArray(contributors)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The home page crashes locally pretty quickly without this check, as GitHub API has rate limits.
58a2397
to
4b8013a
Compare
I think this will need the netfliy nodejs version upgraded. |
This happens to improve the prefetch behaviour so that it only happens on link hover instead of on page load.
This reduces the size of the JS bundles.
1ef8f50
to
cde89e3
Compare
import { useStore } from '@nanostores/react' | ||
import React from 'react' | ||
import { isMenuOpen } from '../../state/menuState' | ||
import { useSignal } from '@preact/signals' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably just swap this for a useState no need to bring in signals just for this.
navRef.current.removeEventListener('command', handleCommand) | ||
} | ||
} | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an empty array as the second param
This happens to improve the prefetch behaviour so that it only happens on link hover instead of on page load.