web/src/pages/inventory/index.astro
59 lines · 1549 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 var(--space-lg) auto;
32 padding: var(--space-md);
33 width: var(--width-container);
34 max-width: var(--width-container-max);
35 display: flex;
36 justify-content: space-between;
37 flex-direction: column;
38 min-height: calc(100vh - 12rem);
39 font-size: var(--text-md);
40 .top-row {
41 display: flex;
42 justify-content: space-between;
43 align-items: center;
44 margin-bottom: var(--space-md);
45 }
46 h2 {
47 font-family: var(--font-subtitle);
48 font-weight: bold;
49 font-size: var(--text-4xl);
50 margin: 0;
51 color: var(--accent-3);
52 }
53 .buttons {
54 margin: var(--space-md) auto;
55 display: flex;
56 flex-direction: column;
57 }
58 }
59</style>