Skip to content

Commit 26fa37e

Browse files
committed
build: type error fix
1 parent 6577150 commit 26fa37e

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"lodash": "^4.17.21",
1818
"lqip-modern": "^2.0.0",
1919
"next": "^13.4.4",
20-
"notion-to-utils": "^0.4.4",
20+
"notion-to-utils": "^0.4.5",
2121
"p-map": "^7.0.2",
2222
"react": "^18.2.0",
2323
"react-dom": "^18.2.0",

src/interfaces/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import { PageObjectResponse, MultiSelectPropertyItemObjectResponse } from 'notion-to-utils';
1+
import {
2+
PageObjectResponse,
3+
MultiSelectPropertyItemObjectResponse,
4+
GetPageResponse,
5+
} from 'notion-to-utils';
26

37
import { PreviewImage } from '@/interfaces/notion';
48

9+
export type { PageObjectResponse, GetPageResponse };
510
export type SelectPropertyResponse = MultiSelectPropertyItemObjectResponse['multi_select'][number];
611
export type SelectColor = SelectPropertyResponse['color'];
712

src/utils/getNotionPosts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { GetPageResponse } from 'notion-to-utils';
2+
13
import { notionClient } from '@/utils';
24

35
const getNotionPosts = async (databaseId: string) => {
@@ -35,7 +37,7 @@ const getNotionPosts = async (databaseId: string) => {
3537
],
3638
});
3739

38-
return response.results;
40+
return response.results as GetPageResponse[];
3941
};
4042

4143
export default getNotionPosts;

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,10 +2311,10 @@ normalize-url@^7.0.3:
23112311
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-7.2.0.tgz#5317f78cff95f5fa1e76cc0b5e33245c43781e11"
23122312
integrity sha512-uhXOdZry0L6M2UIo9BTt7FdpBDiAGN/7oItedQwPKh8jh31ZlvC8U9Xl/EJ3aijDHaywXTW3QbZ6LuCocur1YA==
23132313

2314-
notion-to-utils@^0.4.4:
2315-
version "0.4.4"
2316-
resolved "https://registry.yarnpkg.com/notion-to-utils/-/notion-to-utils-0.4.4.tgz#d0419a39f14e99b021477e4521c801d3336f8531"
2317-
integrity sha512-Tp0IORqdT3E3yKpHyuuUXcifb2GLpfc6hpbzwUmpMTRD2LlrTP2GBL0QsiiM6yrLyt+k0X8YWyUEu0zp6KPTzg==
2314+
notion-to-utils@^0.4.5:
2315+
version "0.4.5"
2316+
resolved "https://registry.yarnpkg.com/notion-to-utils/-/notion-to-utils-0.4.5.tgz#68c36c867e0c309bbe9740f70c5850cfe17f7c19"
2317+
integrity sha512-dqmDTbj+bQUCp9g6w14UM2KKM0J7tkFYk4u2KCJriSfHpUrcEugaUCdkn1d0PrRE4dgtYAINp/CjdJ8iCIFaNA==
23182318
dependencies:
23192319
"@notionhq/client" "^2.2.15"
23202320

0 commit comments

Comments
 (0)