Skip to content

Commit

Permalink
Set dynamic base URL path for Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
RodBrowning committed Jul 29, 2022
1 parent 0705837 commit e5efc80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_BASE_API_URL = "http://localhost:3004/"
VITE_API_KEY = "PlaceHolderText"
VITE_BASE_URL = "/"
2 changes: 1 addition & 1 deletion src/Components/Flags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Flag: React.FC<Props> = ({ currency }) => {
className="flag"
key={flag}
style={{
backgroundImage: `url(/assets/flags/${flag})`,
backgroundImage: `url(${import.meta.env.BASE_URL}assets/flags/${flag})`,
}}
/>
);
Expand Down

0 comments on commit e5efc80

Please sign in to comment.