0
Size: a a a
0
YP
D
react-router-dom
Может я не там зарегистрировал роуты?const App = () => {
console.log('!!!!!!');
const currentUser = storage.getCurrentUser();
if (!currentUser) {
return <Redirect to="/reg" />;
}
return (
<>
<Home />
<Switch>
<Route exact path="/reg" component={RegistrationPage} />
<Route exact path="/auth" component={AuthenticationPage} />
<Route exact path="/" component={Home} />
</Switch>
</>
);
};
init.jsconst runApp = () => {
storage.initDataBase();
const store = configureStore({ reducer });
render(
<BrowserRouter>
<Provider store={store}>
<App />
</Provider>
</BrowserRouter>,
document.getElementById('root'),
);
};
index.jsD
D
console.log
- не работает кстатиTG
RY
react-router-dom
Может я не там зарегистрировал роуты?const App = () => {
console.log('!!!!!!');
const currentUser = storage.getCurrentUser();
if (!currentUser) {
return <Redirect to="/reg" />;
}
return (
<>
<Home />
<Switch>
<Route exact path="/reg" component={RegistrationPage} />
<Route exact path="/auth" component={AuthenticationPage} />
<Route exact path="/" component={Home} />
</Switch>
</>
);
};
init.jsconst runApp = () => {
storage.initDataBase();
const store = configureStore({ reducer });
render(
<BrowserRouter>
<Provider store={store}>
<App />
</Provider>
</BrowserRouter>,
document.getElementById('root'),
);
};
index.jsYP
꧁岡
YP
꧁岡
꧁岡
YP
t
𝓐
𝓐
YP
as
YP
YP