Skip to content

Commit

Permalink
replace img
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Dec 20, 2024
1 parent d1b9f52 commit d8d1ca9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import Button from "components/Button"
import {paths, TEST_NET} from "lib/constants"
import publicConfig from "lib/publicConfig"
import Image from "next/image"
import {Link, Text, ThemeUICSSObject} from "theme-ui"

export default function Header({fund}: {fund?: boolean}) {
Expand Down Expand Up @@ -29,7 +30,7 @@ export default function Header({fund}: {fund?: boolean}) {
// eslint-disable-next-line react/no-unknown-property
<header sx={styles.header} data-test="header">
<Link href={paths.root} sx={styles.logo}>
<img
<Image
style={{width: "100%"}}
src={`/flow-faucet-logo-${publicConfig.network}.svg`}
alt="Flow"
Expand Down
3 changes: 2 additions & 1 deletion components/LoadingFeedback.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Box, ThemeUICSSObject} from "theme-ui"
import Image from "next/image"

const styles: Record<string, ThemeUICSSObject> = {
loading: {
Expand All @@ -21,7 +22,7 @@ export default function LoadingFeedback({
}) {
return (
<Box sx={styles.loading}>
<img src="loading.svg" />
<Image src="loading.svg" alt="loading" />
<br />
{children}
</Box>
Expand Down
7 changes: 6 additions & 1 deletion components/SidebarAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {useState} from "react"
import {Box, Button, Link, ThemeUICSSObject} from "theme-ui"
import {Themed} from "@theme-ui/mdx"
import publicConfig from "../lib/publicConfig"
import Image from "next/image"

type AccordionOption = {
title: string
Expand Down Expand Up @@ -139,7 +140,11 @@ const AccordionOption = ({
}}
>
{data.title}
<img src={`caret-${isOpen ? "up" : "down"}.svg`} />
{isOpen ? (
<Image src="caret-up.svg" alt="up" />
) : (
<Image src="caret-down.svg" alt="down" />
)}
</Button>
{isOpen && (
<Box sx={styles.content} {...contentProps}>
Expand Down

0 comments on commit d8d1ca9

Please sign in to comment.