Skip to content

Commit

Permalink
fix: add base URL for footer assets from env
Browse files Browse the repository at this point in the history
  • Loading branch information
Yggdrasilqh committed Nov 1, 2024
1 parent ee62101 commit a78a169
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 a78a169

Please sign in to comment.