Skip to content

Commit 3f9f2da

Browse files
committed
update nuxt demo to rc1
1 parent 64fb52a commit 3f9f2da

File tree

7 files changed

+1357
-1084
lines changed

7 files changed

+1357
-1084
lines changed

demo/nuxt/composables/useProps.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const useProps = () => {
2+
const mapPageUrl = (pageId: String) => {
3+
return `/page/${pageId}`
4+
}
5+
6+
const pageLinkOptions = computed(() => ({
7+
component: defineNuxtLink({}),
8+
href: "to",
9+
}))
10+
11+
return {
12+
mapPageUrl,
13+
pageLinkOptions,
14+
}
15+
}

demo/nuxt/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineNuxtConfig } from "nuxt3"
1+
import { defineNuxtConfig } from "nuxt"
22

33
export default defineNuxtConfig({
44
meta: {

demo/nuxt/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"start": "node .output/server/index.mjs"
1010
},
1111
"dependencies": {
12-
"@nuxt/kit-edge": "^3.0.0-27449998.32cf973",
13-
"nuxt3": "^3.0.0-27449998.32cf973",
12+
"nuxt": "^3.0.0-rc.1",
1413
"vue3-notion": "^0.1.26"
1514
}
1615
}

demo/nuxt/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import { useNuxtApp } from "#app"
3-
import { mapPageUrl, pageLinkOptions } from "~~/props"
43
54
const { $notion } = useNuxtApp()
65
const { data } = await useAsyncData("notion-index", () => $notion.getPageBlocks("4b2dc28a5df74034a943f8c8e639066a"))
6+
const { mapPageUrl, pageLinkOptions } = useProps()
77
</script>
88

99
<template>

demo/nuxt/pages/page/[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
22
import { useNuxtApp } from "#app"
3-
import { mapPageUrl, pageLinkOptions } from "~~/props"
43
54
const route = useRoute()
65
const { $notion } = useNuxtApp()
76
const { data } = await useAsyncData(`notion-${route.params.id}`, () => $notion.getPageBlocks(route.params.id))
7+
const { mapPageUrl, pageLinkOptions } = useProps()
88
</script>
99

1010
<template>

demo/nuxt/props.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

demo/nuxt/yarn.lock

Lines changed: 1338 additions & 1072 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)