Skip to content

Commit 4ac6e1c

Browse files
authored
Merge pull request #96 from code4rena-dev/nlf/fix-paths
chore: make all image references use relative paths
2 parents 728092a + 5ad5d5d commit 4ac6e1c

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.storybook/manager-header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<link rel="shortcut icon" href="/favicon.ico">
2-
<link rel="icon" type="image/png" href="/logos/apple-touch-icon.png" sizes="192x192">
2+
<link rel="icon" type="image/png" href="./logos/apple-touch-icon.png" sizes="192x192">

.storybook/theme.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default create({
44
base: "dark",
55
brandUrl: "https://code4rena.com",
66
brandTitle: "Code4rena Storybook",
7-
brandImage: "/logos/c4-logo.svg",
7+
brandImage: "./logos/c4-logo.svg",
88
brandTarget: "_blank",
99

1010
// UI

src/lib/Avatar/Avatar.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof Avatar>;
1717

1818
export const ImageAvatar: Story = (args) => <Avatar {...args} />;
1919
ImageAvatar.args = {
20-
imgElement: <img src="/images/default-avatar.png" alt="Placeholder" />,
20+
imgElement: <img src="./images/default-avatar.png" alt="Placeholder" />,
2121
name: "0xJohnWithALongName",
2222
size: 50,
2323
round: 25,

src/lib/Avatar/Avatar.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ const defaultArgs = {
1212
describe("========== Avatar Component - RUNNING TESTS ==========", () => {
1313
test("Renders with image avatar", () => {
1414
const imgElement = (
15-
<img src="/images/default-avatar.png" alt="Placeholder" />
15+
<img src="./images/default-avatar.png" alt="Placeholder" />
1616
);
1717
render(<Avatar imgElement={imgElement} {...defaultArgs} />);
1818
const avatar = screen.getByRole("img");
19-
expect(avatar).toHaveAttribute("src", "/images/default-avatar.png");
19+
expect(avatar).toHaveAttribute("src", "./images/default-avatar.png");
2020
});
2121

2222
test("Renders with initials avatar", () => {
@@ -27,7 +27,7 @@ describe("========== Avatar Component - RUNNING TESTS ==========", () => {
2727

2828
test("Sets alt text for image avatar", () => {
2929
const imgElement = (
30-
<img src="/images/default-avatar.png" alt="User avatar" />
30+
<img src="./images/default-avatar.png" alt="User avatar" />
3131
);
3232
render(<Avatar imgElement={imgElement} {...defaultArgs} />);
3333
const avatar = screen.getByAltText("User avatar");

src/lib/Card/Card.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SampleComponent.args = {
3232
children: <div>Team lead</div>,
3333
title: "MangoBurger",
3434
imageSize: CardImageSize.MEDIUM,
35-
image: <img src="/images/default-avatar.png" />,
35+
image: <img src="./images/default-avatar.png" />,
3636
imageBorderRadius: CardImageBorderRadius.CIRCLE,
3737
cta: { text: "Follow", onClick: () => console.log("follow") },
3838
variants: [

src/lib/ContestTile/ContestTile.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const defaultArgs = {
5353
endDate: "2030-07-21T18:00:00.000Z",
5454
},
5555
variant: ContestTileVariant.DARK,
56-
sponsorImage: "/logos/apple-touch-icon.png",
56+
sponsorImage: "./logos/apple-touch-icon.png",
5757
sponsorUrl: "https://twitter.com/axelarcore",
5858
title: "Axelar Network",
5959
description: "Decentralized interoperability network.",
@@ -342,7 +342,7 @@ BountyTile.args = {
342342
languages: ["Rust"] as CodingLanguage[],
343343
},
344344
variant: ContestTileVariant.LIGHT,
345-
sponsorImage: "/logos/apple-touch-icon.png",
345+
sponsorImage: "./logos/apple-touch-icon.png",
346346
sponsorUrl: "https://twitter.com/axelarcore",
347347
title: "Axelar Network",
348348
description: "Decentralized interoperability network."

src/lib/NavBar/NavBar.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SampleComponent.args = {
3232
className: "",
3333
isLoggedIn: false,
3434
hideConnectWalletDropdown: false,
35-
userImage: "/logos/apple-touch-icon.png",
35+
userImage: "./logos/apple-touch-icon.png",
3636
username: "TestUser",
3737
navLinks: [
3838
{ label: "How it works", href: "/how-it-works" },

0 commit comments

Comments
 (0)