forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdminPanel.js
More file actions
33 lines (31 loc) · 1.02 KB
/
Copy pathAdminPanel.js
File metadata and controls
33 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React from 'react'
import { Stack, SimpleGrid } from '@chakra-ui/core'
import { string } from 'prop-types'
import { AdminDomains } from './AdminDomains'
import { ErrorBoundary } from 'react-error-boundary'
import { ErrorFallbackMessage } from './ErrorFallbackMessage'
import UserList from './UserList'
export default function AdminPanel({ orgSlug, permission, orgId }) {
return (
<Stack spacing={10}>
<SimpleGrid columns={{ lg: 2 }} spacing="60px" width="100%">
<ErrorBoundary FallbackComponent={ErrorFallbackMessage}>
<AdminDomains orgSlug={orgSlug} domainsPerPage={4} orgId={orgId} />
</ErrorBoundary>
<ErrorBoundary FallbackComponent={ErrorFallbackMessage}>
<UserList
permission={permission}
orgSlug={orgSlug}
usersPerPage={4}
orgId={orgId}
/>
</ErrorBoundary>
</SimpleGrid>
</Stack>
)
}
AdminPanel.propTypes = {
orgSlug: string.isRequired,
permission: string.isRequired,
orgId: string,
}