From fa400d46aa72532fa628eb8b3d7eccc359b7c69b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 18 Jul 2022 17:03:50 -0700 Subject: Remove unnecessary code --- modern/src/settings/UsersPage.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modern/src/settings/UsersPage.js b/modern/src/settings/UsersPage.js index f553f82c..5b2c1833 100644 --- a/modern/src/settings/UsersPage.js +++ b/modern/src/settings/UsersPage.js @@ -1,5 +1,4 @@ import React, { useState } from 'react'; -import { useDispatch } from 'react-redux'; import { Table, TableRow, TableCell, TableHead, TableBody, } from '@mui/material'; @@ -14,7 +13,6 @@ import CollectionFab from './components/CollectionFab'; import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import { useAdministrator } from '../common/util/permissions'; -import { sessionActions } from '../store'; const useStyles = makeStyles((theme) => ({ columnAction: { @@ -25,7 +23,6 @@ const useStyles = makeStyles((theme) => ({ const UsersPage = () => { const classes = useStyles(); - const dispatch = useDispatch(); const t = useTranslation(); const admin = useAdministrator(); @@ -37,8 +34,6 @@ const UsersPage = () => { const handleLogin = useCatch(async (userId) => { const response = await fetch(`/api/session/${userId}`); if (response.ok) { - const user = await response.json(); - dispatch(sessionActions.updateUser(user)); window.location.replace('/'); } else { throw Error(await response.text()); -- cgit v1.2.3