diff --git a/.env b/.env index 91c783a..cb09c86 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ VITE_DOMAIN_DEV='http://localhost:5000' -VITE_DOMAIN_PROD='https://sean.bet' +VITE_DOMAIN_PROD='http://localhost:5000' VITE_BASE_URL='trigger' \ No newline at end of file diff --git a/.gitignore b/.gitignore index a547bf3..3b0b403 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ dist-ssr *.njsproj *.sln *.sw? + +.env \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index b1c783f..c05efa3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -47,8 +47,8 @@ function App() { const router = createBrowserRouter( createRoutesFromElements( - } /> - } /> + } /> + } /> , ), ); @@ -71,7 +71,7 @@ function App() { width: '100%', height: '100%', position: 'fixed', - backgroundImage: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(../backgrounds/${theme.backgroundImage})`, + backgroundImage: `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(backgrounds/${theme.backgroundImage})`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: 'center', diff --git a/src/pages/homepage/components/SettingsButton.tsx b/src/pages/homepage/components/SettingsButton.tsx index 1d8bd47..f206d5b 100644 --- a/src/pages/homepage/components/SettingsButton.tsx +++ b/src/pages/homepage/components/SettingsButton.tsx @@ -33,7 +33,7 @@ function SettingsButton({ method: 'GET', headers: { 'Content-Type': 'application/json' }, }; - fetch('/trigger/api/wakeDakota', requestOptions); + fetch(`/${import.meta.env.VITE_BASE_URL}/api/wakeDakota`, requestOptions); } return ( @@ -46,7 +46,7 @@ function SettingsButton({ diff --git a/src/pages/settings/Settings.tsx b/src/pages/settings/Settings.tsx index 410d2b4..2e7dfa5 100644 --- a/src/pages/settings/Settings.tsx +++ b/src/pages/settings/Settings.tsx @@ -18,7 +18,7 @@ function Settings({ theme }: any) { className={actionIconClasses.backButton} classNames={actionIconClasses} component='a' - href='/trigger' + href={`/${import.meta.env.VITE_BASE_URL}`} > diff --git a/src/pages/settings/components/ThemeModalContent.tsx b/src/pages/settings/components/ThemeModalContent.tsx index e1dd6f1..e8eefe6 100644 --- a/src/pages/settings/components/ThemeModalContent.tsx +++ b/src/pages/settings/components/ThemeModalContent.tsx @@ -73,7 +73,7 @@ export default function ThemeModalContent({ selectedTheme }: any) {