Update use of server error blocks
This commit is contained in:
parent
e30a765071
commit
32fb21d0b7
20 changed files with 132 additions and 116 deletions
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import Can from '@/components/elements/Can';
|
||||
import ScreenBlock from '@/components/screens/ScreenBlock';
|
||||
import { ServerError } from '@/components/elements/ScreenBlock';
|
||||
|
||||
export interface RequireServerPermissionProps {
|
||||
permissions: string | string[]
|
||||
}
|
||||
|
@ -10,8 +11,7 @@ const RequireServerPermission: React.FC<RequireServerPermissionProps> = ({ child
|
|||
<Can
|
||||
action={permissions}
|
||||
renderOnError={
|
||||
<ScreenBlock
|
||||
image={'/assets/svgs/server_error.svg'}
|
||||
<ServerError
|
||||
title={'Access Denied'}
|
||||
message={'You do not have permission to access this page.'}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue