web/src/pages/inventory/index.astro

59 lines · 1462 bytes

 1---
 2import Layout from '@layouts/Layout.astro';
 3import SavedServices from '@components/things/SavedServices.svelte';
 4import GetSharableLink from '@components/things/GetSharableLink.svelte';
 5
 6import { fetchData } from '@utils/fetch-data';
 7import Button from '@components/form/Button.astro';
 8import EditableTitle from '@components/form/EditableTitle.svelte';
 9import type { Category } from '../../types/Service';
10
11const categories = (await fetchData())?.categories || ([] as Category[]);
12---
13
14<Layout title="Saved Services">
15	<main>
16		<div class="top-row">
17			<!-- <h2>Inventory</h2> -->
18			<EditableTitle client:load />
19			<GetSharableLink client:load />
20		</div>
21		<SavedServices allData={categories} client:load />
22		<div class="buttons">
23			<p>Not found what you're looking for?</p>
24			<Button url="/all">Browse Services</Button>
25		</div>
26	</main>
27</Layout>
28
29<style lang="scss">
30	main {
31		margin: 0 auto 2rem auto;
32		padding: 1rem;
33		width: 1200px;
34		max-width: calc(100% - 5rem);
35		display: flex;
36		justify-content: space-between;
37		flex-direction: column;
38		min-height: calc(100vh - 12rem);
39		font-size: 1.25rem;
40		.top-row {
41			display: flex;
42			justify-content: space-between;
43			align-items: center;
44			margin-bottom: 1rem;
45		}
46		h2 {
47			font-family: 'Lekton', sans-serif;
48			font-weight: bold;
49			font-size: 3rem;
50			margin: 0;
51			color: var(--accent-3);
52		}
53		.buttons {
54			margin: 1rem auto;
55			display: flex;
56			flex-direction: column;
57		}
58	}
59</style>