Skip to content

Commit

Permalink
fix: Image illustrations display and sizing (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker authored Feb 5, 2025
1 parent bb4a681 commit 4fafdc2
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-houses-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"namesake": patch
---

Fix broken images in quest headers
3 changes: 0 additions & 3 deletions public/images/flower.png

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/gavel.png

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/id.png

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/passport.png

This file was deleted.

3 changes: 0 additions & 3 deletions public/images/social-security.png

This file was deleted.

15 changes: 10 additions & 5 deletions src/components/quests/QuestPageHeader/QuestPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import { useState } from "react";
import { Heading } from "react-aria-components";
import { toast } from "sonner";
import { StatusSelect } from "../StatusSelect/StatusSelect";
import flowerImg from "./flower.png";
import gavelImg from "./gavel.png";
import idImg from "./id.png";
import passportImg from "./passport.png";
import socialSecurityImg from "./social-security.png";

interface QuestPageHeaderProps extends Omit<PageHeaderProps, "title"> {
quest?: Doc<"quests"> | null;
Expand All @@ -32,23 +37,23 @@ function CoreQuestIllustration({ category }: { category: CoreCategory }) {
const illustration: Record<CoreCategory, { alt: string; src: string }> = {
courtOrder: {
alt: "A gavel with a snail on it",
src: "/images/gavel.png",
src: gavelImg,
},
passport: {
alt: "A snail on a passport",
src: "/images/passport.png",
src: passportImg,
},
socialSecurity: {
alt: "A snail on a social security card",
src: "/images/social-security.png",
src: socialSecurityImg,
},
stateId: {
alt: "A snail on a Massachusetts ID card",
src: "/images/id.png",
src: idImg,
},
birthCertificate: {
alt: "A snail on a flower",
src: "/images/flower.png",
src: flowerImg,
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/components/quests/QuestPageHeader/flower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/quests/QuestPageHeader/gavel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/quests/QuestPageHeader/id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/quests/QuestPageHeader/passport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/quests/QuestPageHeader/social-security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4fafdc2

Please sign in to comment.