Skip to content

Commit

Permalink
improve playground
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienZ committed Oct 4, 2024
1 parent 43dd2c4 commit 1fadc2e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
"pnpm install && cd playground && pnpm install"
],
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"Start": {
"name": "Start",
"command": "pnpm dev",
"command": "pnpm install && cd playground && pnpm install && pnpm dev",
"runAtStart": true,
"preview": {
"port": 3000
Expand Down
9 changes: 8 additions & 1 deletion playground/components/TheFooter.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<div class="pb-4">
{{route.fullPath}}

Check warning on line 3 in playground/components/TheFooter.vue

View workflow job for this annotation

GitHub Actions / install-lint-and-test

Expected 1 space after '{{', but not found

Check warning on line 3 in playground/components/TheFooter.vue

View workflow job for this annotation

GitHub Actions / install-lint-and-test

Expected 1 space before '}}', but not found

<UTable
v-if="usersInDb"
class="mt-12"
Expand All @@ -9,5 +11,10 @@
</template>

<script setup lang="ts">
const { data: usersInDb } = await useAsyncData("usersInDb", () => $fetch("/api/users"));
const { data: usersInDb, refresh } = await useAsyncData("usersInDb", () => $fetch("/api/users"));
const route = useRoute();
watch(() => route.fullPath, () => {
refresh();
});
</script>
1 change: 1 addition & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"devDependencies": {
"@iconify-json/heroicons": "^1.2.0",
"@iconify-json/heroicons-solid": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.1",
"drizzle-kit": "^0.24.2",
"wrangler": "^3.79.0"
Expand Down
2 changes: 2 additions & 0 deletions playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ async function handleSubmit() {
if (data.value) {
await fetchSession();
// triggernavifation
await navigateTo("/?auth=success");
}
else {
alert(action + " failed");
Expand Down
10 changes: 10 additions & 0 deletions playground/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1fadc2e

Please sign in to comment.