resolve the TODOs

This commit is contained in:
Sven Czarnian
2022-11-05 02:28:16 +01:00
parent 03919f7b97
commit 8c6d6ae5e2
2 changed files with 12 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ import { Card } from 'primereact/card';
import { DataTable } from 'primereact/datatable';
import { Password } from 'primereact/password';
import { AuthContext } from '../contexts';
import { Auth } from '../services';
import { Auth, Session } from '../services';
import { BackendReturnStatus } from '../types';
import { Column } from 'primereact/column';
@@ -18,9 +18,8 @@ export const Overview: React.FC = () => {
const regenerateKey = async () => {
Auth.refreshRadarScopeKey().then((status) => {
if (status === BackendReturnStatus.Unauthorized) {
Session.setLastShownComponent('/overview');
Auth.triggerLoginFlow();
// TODO reload user data in auth
// TODO store current URL and get back after login
} else if (status === BackendReturnStatus.Failure) {
setStatusMessage({
error: true,