From de1e6c16c0257cabea7f3a55047cdfee418dafa2 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sun, 20 Nov 2022 17:01:52 -0800 Subject: [PATCH] Add logout to error fallback --- .../action-required/components/error-fallback.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/renderer/features/action-required/components/error-fallback.tsx b/src/renderer/features/action-required/components/error-fallback.tsx index 3143317a2..bbf81c795 100644 --- a/src/renderer/features/action-required/components/error-fallback.tsx +++ b/src/renderer/features/action-required/components/error-fallback.tsx @@ -1,14 +1,18 @@ import { Box, Center, Group, Stack } from '@mantine/core'; import { FallbackProps } from 'react-error-boundary'; import { RiErrorWarningLine } from 'react-icons/ri'; +import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { Button, Text } from '@/renderer/components'; +import { useAuthStore } from '@/renderer/store'; const Container = styled(Box)` background: var(--main-bg); `; export const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => { + const logout = useAuthStore((state) => state.logout); + return (
@@ -21,6 +25,17 @@ export const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => { + +