|
1 | | -import { useQuery } from '@apollo/client' |
2 | | -import { |
3 | | - Box, |
4 | | - Flex, |
5 | | - Heading, |
6 | | - HStack, |
7 | | - Link, |
8 | | - Skeleton, |
9 | | - Text, |
10 | | -} from '@chakra-ui/react' |
| 1 | +import { Box, Flex, Heading, HStack, Link, Text } from '@chakra-ui/react' |
11 | 2 | import { Button } from '@opengovsg/design-system-react' |
12 | 3 | import Lottie from 'lottie-react' |
13 | 4 |
|
14 | 5 | import HeroLottie from '@/assets/landing/HeroLottie.json' |
15 | 6 | import * as URLS from '@/config/urls' |
16 | | -import { GET_PLUMBER_STATS } from '@/graphql/queries/get-plumber-stats' |
17 | 7 |
|
18 | 8 | import BackgroundPattern from './components/BackgroundPattern' |
19 | 9 |
|
20 | | -function estimateCountByHundreds(count: number): string { |
21 | | - return count < 100 |
22 | | - ? count.toString() |
23 | | - : (Math.round(count / 100) * 100).toLocaleString() + '+' |
24 | | -} |
25 | | - |
26 | 10 | export default function HeroSection() { |
27 | | - // TODO: Remove this if really not needed |
28 | | - const { loading, data } = useQuery(GET_PLUMBER_STATS) |
29 | | - const userCount = data?.getPlumberStats.userCount |
30 | | - const executionCount = data?.getPlumberStats.executionCount |
31 | | - |
32 | 11 | return ( |
33 | 12 | <Box position="relative" overflow="hidden"> |
34 | 13 | <BackgroundPattern /> |
@@ -70,28 +49,6 @@ export default function HeroSection() { |
70 | 49 | Automate manual processes in hours, not weeks |
71 | 50 | </Text> |
72 | 51 |
|
73 | | - {/* <Text |
74 | | - textStyle="subhead-1" |
75 | | - fontSize={{ base: 'md', sm: 'xl', lg: '2xl' }} |
76 | | - mt={8} |
77 | | - > |
78 | | - <Skeleton display="inline" isLoaded={!loading}> |
79 | | - <Text as="span" color="primary.500"> |
80 | | - {executionCount ? estimateCountByHundreds(executionCount) : ''}{' '} |
81 | | - </Text> |
82 | | - {` tasks have been automated`} |
83 | | - </Skeleton> |
84 | | - </Text> |
85 | | -
|
86 | | - <Text textStyle="subhead-1" mt={2}> |
87 | | - <Text as="span" color="primary.500"> |
88 | | - <Skeleton display="inline" isLoaded={!loading}> |
89 | | - {estimateCountByHundreds(userCount)} |
90 | | - </Skeleton> |
91 | | - </Text> |
92 | | - {` public officers have started automating their work`} |
93 | | - </Text> */} |
94 | | - |
95 | 52 | <HStack spacing={6} mt={10} align="center"> |
96 | 53 | <Button |
97 | 54 | as="a" |
|
0 commit comments