Skip to content

Commit

Permalink
Feat: add button on domains page
Browse files Browse the repository at this point in the history
Add button on the domains page that gets the user to new domain screen

Closes #198
  • Loading branch information
Myrfion authored and humphd committed Feb 15, 2023
1 parent 408f35a commit 312dcc6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/routes/__index/domains/index.tsx
@@ -1,5 +1,6 @@
import { Container, Heading, Text } from '@chakra-ui/react';
import { useNavigate } from '@remix-run/react';
import { AddIcon } from '@chakra-ui/icons';
import { Button, Container, Flex, Heading, Text } from '@chakra-ui/react';
import { Link, useNavigate } from '@remix-run/react';
import type { DomainsTableAction } from '~/components/domains-table';
import DomainsTable from '~/components/domains-table';
import DOMAINS_MOCK from '~/mocks/domains';
Expand Down Expand Up @@ -31,6 +32,11 @@ export default function DomainsIndexRoute() {
been the industry's standard dummy text ever since the 1500s, when an unknown printer took a
galley of type and scrambled it to make a type specimen book.
</Text>
<Flex justifyContent="flex-end">
<Link to="/domains/new">
<Button rightIcon={<AddIcon boxSize={3} />}>Create new domain</Button>
</Link>
</Flex>
<DomainsTable domains={DOMAINS_MOCK} onAction={onDomainAction} />
</Container>
);
Expand Down

0 comments on commit 312dcc6

Please sign in to comment.