feat: handle forbidden request error.

This commit is contained in:
a.bouhuolia
2021-11-26 16:11:42 +02:00
parent c14b35356b
commit fe9ca215ab
4 changed files with 23 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import { Button, Popover, Menu, Position } from '@blueprintjs/core';
import Icon from 'components/Icon';
import { compose, firstLettersArgs } from 'utils';
import withCurrentOrganization from '../../containers/Organization/withCurrentOrganization';
import { useAuthenticatedUser } from '../Dashboard/AuthenticatedUser';
import { useAuthenticatedAccount } from '../../hooks/query';
// Popover modifiers.
const POPOVER_MODIFIERS = {
@@ -18,7 +18,7 @@ function SidebarHead({
organization,
}) {
// Retrieve authenticated user information.
const { user } = useAuthenticatedUser();
const { data: user } = useAuthenticatedAccount();
return (
<div className="sidebar__head">