mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 13:11:02 +00:00
fix(frontend): redirect to home after login
This commit is contained in:
parent
416765e456
commit
367f37555f
2 changed files with 8 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import React from "react";
|
||||
import { Route, Switch } from "react-router-dom";
|
||||
import { LoginFailure } from "./components/LoginFailure";
|
||||
import { LoginSuccess } from "./components/LoginSuccess";
|
||||
import { NavBar } from "./components/NavBar";
|
||||
import { RecentListens } from "./components/RecentListens";
|
||||
import { ReportListens } from "./components/ReportListens";
|
||||
|
|
@ -21,6 +22,7 @@ export function App() {
|
|||
</header>
|
||||
<Switch>
|
||||
<Route path="/" exact />
|
||||
<Route path="/login/success" exact component={LoginSuccess} />
|
||||
<Route path="/login/failure" exact component={LoginFailure} />
|
||||
<Route path="/listens" exact component={RecentListens} />
|
||||
<Route path="/reports/listens" exact component={ReportListens} />
|
||||
|
|
|
|||
6
frontend/src/components/LoginSuccess.tsx
Normal file
6
frontend/src/components/LoginSuccess.tsx
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import React from "react";
|
||||
import { Redirect } from "react-router-dom";
|
||||
|
||||
export const LoginSuccess: React.FC = () => {
|
||||
return <Redirect to="/" />;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue