Skip to content

Commit

Permalink
Change to HashRouter and move static data to external host
Browse files Browse the repository at this point in the history
  • Loading branch information
steciuk committed May 21, 2024
1 parent fc54f16 commit f796007
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
11 changes: 2 additions & 9 deletions src/apis/historic/url.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
const host = window.location.host;
const isDev = import.meta.env.DEV;

export const STATIC_URL =
host + isDev
? '/src/assets/data/valenbici_static.json'
: '/assets/data/valenbici_static.json';
'https://steciuk.github.io/freebici-data/valenbici_static.json';
export const HISTORIC_URL =
host + isDev
? '/src/assets/data/valenbici_historic.json'
: '/assets/data/valenbici_historic.json';
'https://steciuk.github.io/freebici-data/valenbici_historic.json';
1 change: 0 additions & 1 deletion src/assets/data/valenbici_historic.json

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/data/valenbici_static.json

This file was deleted.

6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { HashRouter } from 'react-router-dom';

import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
Expand All @@ -13,9 +13,9 @@ const root = ReactDOM.createRoot(
root.render(
<StrictMode>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<BrowserRouter>
<HashRouter>
<App />
</BrowserRouter>
</HashRouter>
</LocalizationProvider>
</StrictMode>
);

0 comments on commit f796007

Please sign in to comment.