shack/pages/index/index.page.vue

38 lines
637 B
Vue

<template>
<div class="content">
<ul>
<li><a
href="/shelf/create"
class="link"
>Create new shelf</a></li>
<li v-if="!user"><a
href="/account/login"
class="link"
>Log in</a></li>
<li><a
href="/account/create"
class="link"
>Sign up</a></li>
</ul>
<ul>
<li
v-for="shelf in shelves"
:key="shelf.id"
><a
:href="`/s/${shelf.slug}`"
class="link"
>{{ shelf.slug }}</a></li>
</ul>
</div>
</template>
<script setup>
import { usePageContext } from '../../renderer/usePageContext';
const { user, pageData } = usePageContext();
const { shelves } = pageData;
</script>