2018-07-08 13:44:46 -06:00
|
|
|
import * as React from "react";
|
|
|
|
import { Redirect } from "react-router";
|
|
|
|
|
2018-08-07 21:21:26 +03:00
|
|
|
import { AppState, ConsumeState } from "@client/state";
|
2018-07-08 13:44:46 -06:00
|
|
|
|
2018-08-11 20:11:31 +03:00
|
|
|
export default function LogoutPage() {
|
2018-09-02 02:57:55 -06:00
|
|
|
function consumeState(appState: AppState) {
|
|
|
|
appState.tokenStore.clearAll();
|
|
|
|
return <Redirect to="/login" />;
|
|
|
|
}
|
2018-07-08 13:44:46 -06:00
|
|
|
|
2018-09-02 02:57:55 -06:00
|
|
|
return <ConsumeState>{consumeState}</ConsumeState>;
|
2018-07-08 13:44:46 -06:00
|
|
|
}
|