Skip to content

Commit

Permalink
fix: add base URL for footer assets from env (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yggdrasilqh authored Nov 1, 2024
1 parent ee62101 commit 6ec037c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export const Footer: FunctionComponent = () => {
const containerRef = useRef<HTMLDivElement>(null);

useEffect(() => {
fetch(`/footer/${LOCALE_MAPPING[intl.locale as ILocale]}.html`)
fetch(
`${process?.env?.PUBLIC_URL ?? ''}/footer/${
LOCALE_MAPPING[intl.locale as ILocale]
}.html`
)
.then((response) => response.text())
.then((data) => {
const element = containerRef.current;
Expand Down

0 comments on commit 6ec037c

Please sign in to comment.