Skip to content

Commit 08a7974

Browse files
committed
feat(home): update HomePage to use RADFish configuration for logo
1 parent a791a6c commit 08a7974

File tree

1 file changed

+21
-14
lines changed
  • templates/react-javascript/src/pages

1 file changed

+21
-14
lines changed

templates/react-javascript/src/pages/Home.jsx

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,30 @@ import "../index.css";
22
import React from "react";
33
import { Button } from "@trussworks/react-uswds";
44
import { Link } from "react-router-dom";
5+
import { useRadFishConfig } from "../hooks/useRadFishConfig.jsx";
56

67
function HomePage() {
8+
const config = useRadFishConfig();
9+
710
return (
8-
<div className="display-flex flex-column flex-align-center">
9-
<img src="/icons/radfish.png" alt="RADFish logo" height="200" />
10-
<p>
11-
Edit <code>src/App.js</code> and save to reload.
12-
</p>
13-
<p>
14-
<Link
15-
to="https://nmfs-radfish.github.io/radfish/developer-documentation/getting-started"
16-
target="_blank"
17-
>
18-
<Button>Documentation</Button>
19-
</Link>
20-
</p>
21-
</div>
11+
<div className="display-flex flex-column flex-align-center">
12+
<img
13+
src={config.icons.logo}
14+
alt={`${config.app.shortName} logo`}
15+
height="200"
16+
/>
17+
<p>
18+
Edit <code>src/App.js</code> and save to reload.
19+
</p>
20+
<p>
21+
<Link
22+
to="https://nmfs-radfish.github.io/radfish/developer-documentation/getting-started"
23+
target="_blank"
24+
>
25+
<Button>Documentation</Button>
26+
</Link>
27+
</p>
28+
</div>
2229
);
2330
}
2431

0 commit comments

Comments
 (0)