From 45e6e334d319df1f23b8fcda8ea47f3847f3d469 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 7 Jun 2022 15:36:27 -0500 Subject: [PATCH] Add devices page --- src/pages/devices.astro | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/pages/devices.astro diff --git a/src/pages/devices.astro b/src/pages/devices.astro new file mode 100644 index 0000000..bf47627 --- /dev/null +++ b/src/pages/devices.astro @@ -0,0 +1,65 @@ +--- +// Component Script: +// You can write any JavaScript/TypeScript that you'd like here. +// It will run during the build, but never in the browser. +// All variables are available to use in the HTML template below. + +// Full Astro Component Syntax: +// https://docs.astro.build/core-concepts/astro-components/ + +import { DoesItAPI } from '~/helpers/api/client.js' + +import Layout from '../layouts/default.astro' +import SimpleList from '../components/simple-list.astro' + +const deviceIndex = await DoesItAPI.kind.device(1).get() + +const kinds = deviceIndex.items.map( device => { + return { + href: device.endpoint, + heading: device.name, + description: device.description, + } +}) + +--- + + +
+
+

+ Categories +

+ +
+ + + +
+
+ + + +