Skip to content

Commit

Permalink
Frontend setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MdSamsuzzohaShayon committed Nov 10, 2023
1 parent 737b5b2 commit 921cf7f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 30 deletions.
30 changes: 0 additions & 30 deletions client/app.vue

This file was deleted.

6 changes: 6 additions & 0 deletions client/layouts/admin.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
<p>Admin layout</p>
<slot />
</div>
</template>
6 changes: 6 additions & 0 deletions client/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
<p>Some default layout content shared across all pages</p>
<slot />
</div>
</template>
3 changes: 3 additions & 0 deletions client/pages/admin/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h1>Admin page</h1>
</template>
3 changes: 3 additions & 0 deletions client/pages/home/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h1>Index page</h1>
</template>
30 changes: 30 additions & 0 deletions client/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- <NuxtWelcome /> -->
<template>
<p>There are {{ JSON.stringify(data) || 0 }} ships.</p>
</template>

<script lang="ts" setup>
const query = gql`
query GetArticles($limit: Int) {
allArticles(limit: $limit) {
id
title
content
createdAt
author {
id
name
email
}
category {
id
name
}
}
}
`;
const variables = { limit: 20 };
const { data } = await useAsyncQuery(query, variables );
console.log({ data });
</script>

0 comments on commit 921cf7f

Please sign in to comment.