diff --git a/src/pages/sharedSteps/Step2.tsx b/src/pages/sharedSteps/Step2.tsx index b95374d..805550b 100644 --- a/src/pages/sharedSteps/Step2.tsx +++ b/src/pages/sharedSteps/Step2.tsx @@ -1,13 +1,16 @@ import { Box } from '@mui/material'; import { useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; import MainButton from '../../components/MainButton'; import Typography from '../../components/Typography'; import { useActiveStep } from '../../providers/activeStepProvider'; import { useInstallType } from '../../providers/installTypeProvider'; +import { urls } from '../../routes/urls'; const Step2 = () => { const { setActiveStep } = useActiveStep(); const { setInstallType } = useInstallType(); + const navigate = useNavigate(); useEffect(() => { setActiveStep(2); @@ -15,16 +18,19 @@ const Step2 = () => { const handleNewInstall = () => { setInstallType('new-install'); + navigate(urls.newInstallSteps.step3); setActiveStep(3); }; const handleBackup = () => { setInstallType('backup-install'); + navigate(urls.backupInstallSteps.step3); setActiveStep(3); }; const handleMainServer = () => { setInstallType('main-server-install'); + navigate(urls.mainServerInstallSteps.step3); setActiveStep(3); }; diff --git a/vite.config.ts b/vite.config.ts index 3d84cc9..089f9de 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from 'vite'; // https://vitejs.dev/config/ export default defineConfig({ - base: '/hiddify-admin-front/', + base: '/hiddify-admin-front', plugins: [react()], server: { port: 3000, // You can specify the port you want the dev server to run on