Unverified Commit ddf56c8e authored by Zhou (Link)  Fang's avatar Zhou (Link) Fang Committed by GitHub
Browse files

changed BrowserRouter to HashRouter (#105)

parent be8d33b0
......@@ -4,7 +4,7 @@ import AppFooter from './components/UIComponents/layout/AppFooter';
import AppHeader from './components/UIComponents/layout/AppHeader';
import MembershipContext from './Context/MembershipContext';
import { createMuiTheme, ThemeProvider } from '@material-ui/core';
import { BrowserRouter as Router } from 'react-router-dom';
import { HashRouter as Router } from 'react-router-dom';
import Main from './components/Pages/Main';
const theme = createMuiTheme({
......@@ -21,7 +21,7 @@ const App = () => {
const [currentFormId, setCurrentFormId] = useState('');
const [furthestPage, setFurthestPage] = useState({
index: 0,
pathName: '/signIn',
pathName: '/sign-in',
});
const membershipContextValue = {
......@@ -38,7 +38,7 @@ const App = () => {
<ThemeProvider theme={theme}>
<AppHeader />
<MembershipContext.Provider value={membershipContextValue}>
<Router>
<Router hashType="noslash">
<Main />
</Router>
</MembershipContext.Provider>
......
......@@ -111,7 +111,7 @@ export default function Main() {
// generate the step options above the form
const renderStepper = () => (
<div className="stepper">
<Step title="Sign In" index={-1} currentStep={-1} pathName="/signIn" />
<Step title="Sign In" index={-1} currentStep={-1} pathName="/sign-in" />
{PAGE_STEP.map((pageStep, index) => {
return (
......@@ -131,7 +131,7 @@ export default function Main() {
<div className="container eclipseFdn-membership-webform">
<>
{window.location.pathname === '/' ||
window.location.pathname === '/signIn' ? (
window.location.pathname === '/sign-in' ? (
<SignInIntroduction />
) : null}
......@@ -139,10 +139,10 @@ export default function Main() {
<Switch>
<Route exact path="/">
<Redirect to="/signIn" />
<Redirect to="/sign-in" />
</Route>
<Route exact path="/signIn">
<Route exact path="/sign-in">
<SignIn
formField={formField}
label={COMPANY_INFORMATION}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment