Skip to content

Commit

Permalink
[kbss-cvut#293] Migrated Login route
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-kopecky committed Dec 16, 2022
1 parent c8dfacc commit b87ca39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/IntlApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { connect } from "react-redux";
import TermItState from "./model/TermItState";
import BreadcrumbRoute from "./component/breadcrumb/BreadcrumbRoute";
import Mask from "./component/misc/Mask";
import { CompatRouter } from "react-router-dom-v5-compat";
import { CompatRouter, CompatRoute } from "react-router-dom-v5-compat";

const PublicMainView = React.lazy(() => import("./component/public/MainView"));
const MainView = React.lazy(() => import("./component/MainView"));
Expand All @@ -21,13 +21,14 @@ interface IntlWrapperProps {

const IntlWrapper: React.FC<IntlWrapperProps> = (props) => {
const { intl } = props;
console.log(Routes.publicVocabularies.link());
return (
<IntlProvider {...intl}>
<Router history={Routing.history}>
<CompatRouter>
<React.Suspense fallback={<Mask />}>
<Switch>
<Route path={Routes.login.path} component={Login} />
<CompatRoute path={Routes.login.path} component={Login} />
<Route path={Routes.register.path} component={Register} />
<BreadcrumbRoute
path={Routes.publicDashboard.path}
Expand Down
2 changes: 1 addition & 1 deletion src/component/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { login } from "../../action/AsyncUserActions";
import EnhancedInput, { LabelDirection } from "../misc/EnhancedInput";
import Constants, { getEnv } from "../../util/Constants";
import "./Login.scss";
import { Link } from "react-router-dom";
import { Link } from "react-router-dom-v5-compat";
import WindowTitle from "../misc/WindowTitle";
import ConfigParam from "../../util/ConfigParam";

Expand Down

0 comments on commit b87ca39

Please sign in to comment.