adding dboverview route, fixing add new location and add new room

This commit is contained in:
2022-04-09 22:27:26 -04:00
parent 25deaf43c8
commit c79dc69bb0
10 changed files with 274 additions and 53 deletions

View File

@@ -67,7 +67,7 @@ const useStyles = createStyles((theme) => ({
initiallyOpened: true,
links: [
{ label: 'View Rooms', link: '/rooms' },
{ label: 'Previous releases', link: '/' },
{ label: 'Add New Room', link: '/rooms/new' },
{ label: 'Releases schedule', link: '/' },
],
},

View File

@@ -3,7 +3,7 @@ import { useAtom } from 'jotai'
import { serverConfigAtom } from '../../state/main';
import { HiPlus } from 'react-icons/hi'
import { Loader, Center, SimpleGrid, Title, Group, Button } from '@mantine/core'
import { useNavigate } from "react-router-dom";
import { useNotifications } from '@mantine/notifications';
@@ -17,6 +17,8 @@ function LocationsPage() {
const [locations, setLocations] = useState([])
const [serverConfig] = useAtom(serverConfigAtom)
let navigate = useNavigate();
const notifications = useNotifications();
@@ -51,7 +53,7 @@ function LocationsPage() {
<>
<Center>{ isLoading && <Loader size="xl" variant="bars" />}</Center>
<Center><Title order={1}>Locations</Title></Center>
<Button leftIcon={<HiPlus />}>Add New Location</Button>
<Button leftIcon={<HiPlus />} onClick={(e) => {navigate("/locations/new")}}>Add New Location</Button>
<SimpleGrid
spacing="md"
cols={4}