Skip to content

Commit 4d5bb4a

Browse files
committed
update dependencies
1 parent 44f13a0 commit 4d5bb4a

File tree

9 files changed

+3721
-4186
lines changed

9 files changed

+3721
-4186
lines changed

demo/nuxt/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export default defineNuxtConfig({
66
link: [{ rel: "icon", type: "image/png", href: "/logo.png" }],
77
},
88
},
9-
modules: [["vue3-notion/nuxt", { css: true }]],
9+
modules: ["@nuxt/devtools", ["vue3-notion/nuxt", { css: true }]],
1010
});

demo/nuxt/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"dependencies": {
1313
"notion-client": "^6.15.6",
14-
"nuxt": "^3.0.0-rc.12",
15-
"vue3-notion": "^0.1.38"
14+
"nuxt": "^3.4.3",
15+
"vue3-notion": "^0.1.44"
16+
},
17+
"devDependencies": {
18+
"@nuxt/devtools": "^0.4.6"
1619
}
1720
}

demo/nuxt/yarn.lock

Lines changed: 2994 additions & 2454 deletions
Large diffs are not rendered by default.

demo/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"vue": "^3.2.25",
1212
"vue-router": "^4.0.14",
13-
"vue3-notion": "^0.1.26"
13+
"vue3-notion": "^0.1.44"
1414
},
1515
"devDependencies": {
1616
"@vitejs/plugin-vue": "^2.2.0",

demo/vue/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { createApp } from "vue";
22
import App from "./App.vue";
33
import { router } from "./router";
4-
import "vue3-notion/dist/style.css";
54

5+
import "vue3-notion/dist/style.css";
66
import "prismjs/themes/prism.css";
77
import "katex/dist/katex.min.css";
88

demo/vue/src/view/Index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { NotionRenderer, useGetPageBlocks } from "vue3-notion"
2+
import { NotionRenderer, useGetPageBlocks } from "vue3-notion";
33
4-
const { data: blockMap } = useGetPageBlocks("4b2dc28a5df74034a943f8c8e639066a")
4+
const { data: blockMap } = useGetPageBlocks("4b2dc28a5df74034a943f8c8e639066a");
55
</script>
66

77
<template>

demo/vue/src/view/Page.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<script setup lang="ts">
2-
import { onMounted, ref } from "vue"
3-
import { useRoute } from "vue-router"
4-
import { NotionRenderer, getPageBlocks } from "vue3-notion"
2+
import { useRoute } from "vue-router";
3+
import { NotionRenderer, useGetPageBlocks } from "vue3-notion";
54
6-
const route = useRoute()
7-
const blockMap = ref()
8-
onMounted(async () => {
9-
blockMap.value = await getPageBlocks(route.params.id as string)
10-
})
5+
const route = useRoute();
6+
7+
const { data: blockMap } = useGetPageBlocks(route.params.id?.toString());
118
</script>
129

1310
<template>

demo/vue/yarn.lock

Lines changed: 710 additions & 1715 deletions
Large diffs are not rendered by default.

src/lib/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { BlockMap } from "../lib/types";
22

3-
const getPageTable = async (pageId: string, apiUrl = "https://api.vue-notion.workers.dev/v1") =>
3+
const getPageTable = async (pageId: string, apiUrl = "https://api.vue-notion.workers.dev/v1"): Promise<BlockMap> =>
44
await fetch(`${apiUrl}/table/${pageId}`)
55
.then((res) => res.json())
66
.then((data) => data as BlockMap)
77
.catch((err) => err);
88

9-
const getPageBlocks = async (pageId: string, apiUrl = "https://api.vue-notion.workers.dev/v1") =>
9+
const getPageBlocks = async (pageId: string, apiUrl = "https://api.vue-notion.workers.dev/v1"): Promise<BlockMap> =>
1010
await fetch(`${apiUrl}/page/${pageId}`)
1111
.then((res) => res.json())
1212
.then((data) => data as BlockMap)

0 commit comments

Comments
 (0)