Skip to content

Commit

Permalink
Merge pull request #106 from 25Pi25/master
Browse files Browse the repository at this point in the history
bsky mastodon
  • Loading branch information
25Pi25 authored Sep 7, 2024
2 parents a601537 + 8fb7dca commit a9b7e6a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
Binary file added public/bluesky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mastodon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions src/components/bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from "@mui/material"
import HomeIcon from "@mui/icons-material/Home"
import SportsEsportsIcon from "@mui/icons-material/SportsEsports"
import TwitterIcon from "@mui/icons-material/Twitter"
import GitHubIcon from "@mui/icons-material/GitHub"
import InfoIcon from "@mui/icons-material/Info"
import GroupIcon from "@mui/icons-material/Group"
Expand Down Expand Up @@ -47,15 +46,29 @@ export function Bar() {
<IconButton
size="large"
color="inherit"
href="https://twitter.com/PMD_Spritebot"
href="https://bsky.app/profile/pmd-spritebot.bsky.social"
>
<TwitterIcon />
<img src="/bluesky.png" alt="Bluesky Logo" width="24"/>
{!isMobile && (
<Typography variant="h6" ml={0.5}>
Twitter
Bluesky
</Typography>
)}
</IconButton>

<IconButton
size="large"
color="inherit"
href="https://guild.pmdcollab.org/@spritebot"
>
<img src="/mastodon.png" alt="Mastodon Logo" width="24"/>
{!isMobile && (
<Typography variant="h6" ml={0.5}>
Mastodon
</Typography>
)}
</IconButton>

<IconButton
size="large"
color="inherit"
Expand Down
8 changes: 2 additions & 6 deletions src/components/sprite-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ interface Props {
// TODO: move util function somewhere else perhaps? it's only for type checking
const isCopyOf = (sprite: SpriteUnion): sprite is CopyOf => sprite.__typename === "CopyOf";
function getOriginalSprite(sprite: SpriteUnion, actions: SpriteUnion[]): Sprite {
if (!isCopyOf(sprite)) {
return sprite;
}
while (isCopyOf(sprite)) {
// typescript WHYYYYY i made a type guard just for this situation
sprite = actions.find(action => action.action === (sprite as CopyOf).copyOf)!;
if (isCopyOf(sprite)) {
return getOriginalSprite(actions.find(action => action.action === sprite.copyOf)!, actions);
}
return sprite;
}
Expand Down

0 comments on commit a9b7e6a

Please sign in to comment.