Revamps design with modernized UI and improved accessibility - #210
Open
sympact06 wants to merge 9 commits into
Open
Revamps design with modernized UI and improved accessibility#210sympact06 wants to merge 9 commits into
sympact06 wants to merge 9 commits into
Conversation
…, remove stray bun.lock
…es and inline fallbacks
…d accessibility tweaks
| </div> | ||
| <div className="credits"> | ||
| Made with ❤️ by <a href="https://github.com/LunaUrsa">Moonbear</a>{" "} | ||
| <div className="border-t border-line/60"> |
There was a problem hiding this comment.
Might be worth adding something like:
const credits = [
{ name: "Moonbear", href: "https://github.com/LunaUrsa" },
{ name: "Sympact06", href: "https://github.com/Sympact06" },
{ name: "Team TripSit" },
];Then your div block for credits can be simplified:
<p>
Made with <i className="bx bxs-heart align-middle text-violet" aria-hidden />
<span className="sr-only">love</span> by {credits.map((c, i) => (
<span key={c.name}>
{i > 0 && (i === credits.length - 1 ? " and " : ", ")}
{c.href ? (
<a href={c.href} className="text-ink transition hover:text-cyan">
{c.name}
</a>
) : (
c.name
)}
</span>
))}
</p>|
|
||
| async function getDiscordMetrics() { | ||
| export async function getServerSideProps() { |
There was a problem hiding this comment.
This could be made a bit more explicit and we should use constants for the guild values. It's also async without a timeout so we probably don't want everything to freeze if this call freezes:
const GUILD_ID = "179641883222474752";
const GUILD_URL = `https://discord.com/api/v10/guilds/${GUILD_ID}?with_counts=true`;
async function getDiscordGuild(): Promise<APIGuild> {
try {
const { data } = await axios.get<APIGuild>(GUILD_URL, {
timeout: 3000,
headers: { Authorization: `Bot ${process.env.DISCORD_CLIENT_TOKEN}` },
});
return data;
} catch {
return {} as APIGuild;
}
}
export async function getServerSideProps() {
return { props: { guild: await getDiscordGuild() } };
}| } | ||
| }; | ||
| const onPointerDown = (e: PointerEvent) => { | ||
| if (!(e.target as Element).closest("header")) setOpenMenu(null); |
There was a problem hiding this comment.
Might be worth changing this to "instanceof" to prevent a runtime crash in case e.target isn't an Element but we've gone and told Typescript it is.
const onPointerDown = (e: PointerEvent) => {
if (e.target instanceof Element && !e.target.closest("header")) {
setOpenMenu(null);
}
};
silent-decibel
requested changes
Jul 17, 2026
- Add a 3s timeout to the Discord guild fetch so a slow API can't stall SSR, and hoist the guild id/url into constants - Guard the header click-outside handler with instanceof Element instead of a type cast that could crash on non-Element targets - Replace the footer heart emoji with the boxicons heart and an sr-only label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update enhances the codebase's maintainability and delivers a cohesive visual identity across the site.