forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrganization.js
More file actions
30 lines (29 loc) · 904 Bytes
/
Organization.js
File metadata and controls
30 lines (29 loc) · 904 Bytes
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
import React from 'react'
import { Trans } from '@lingui/macro'
import { Text, Link, ListItem, Stack } from '@chakra-ui/core'
import { Link as RouteLink, useRouteMatch } from 'react-router-dom'
import { string, number } from 'prop-types'
export function Organization({ name, slug, domainCount, ...rest }) {
const { path, _url } = useRouteMatch()
return (
<ListItem {...rest}>
<Stack spacing={4} padding={[1, 2, 3]} flexWrap="wrap">
<Stack isInline>
<Link as={RouteLink} to={`${path}/${slug}`}>
<Text fontWeight="bold" fontSize="xl">
{name}
</Text>
</Link>
</Stack>
<Text>
<Trans>Internet facing services: {domainCount}</Trans>
</Text>
</Stack>
</ListItem>
)
}
Organization.propTypes = {
name: string.isRequired,
slug: string.isRequired,
domainCount: number.isRequired,
}