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
|
|
|
|
|
|
|
export function LogoutPage() {
|
|
|
|
function consumeState(appState: AppState) {
|
|
|
|
appState.tokenStore.clear();
|
|
|
|
return (
|
2018-08-11 19:59:20 +03:00
|
|
|
<Redirect to="/login" />
|
2018-07-08 13:44:46 -06:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ConsumeState>{consumeState}</ConsumeState>
|
|
|
|
);
|
|
|
|
}
|