Skip to content

Commit dcc6b60

Browse files
feat: fix search
1 parent c74ca7d commit dcc6b60

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ yarn deps:link
6060
The last step is to make sure that the Next.js project and these local dependencies are all pointing to the same versions of `react` and `react-dom`.
6161

6262
```bash
63-
# from nextjs-notion-starter-kit
63+
# from react-notion-x clone
6464
cd node_modules/react
6565
yarn link
6666
cd ../react-dom
6767
yarn link
6868
```
6969

7070
```bash
71-
# from react-notion-x clone
71+
# from nextjs-notion-starter-kit
7272
yarn link react react-dom
7373
```
7474

lib/search-notion.ts

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ async function searchNotionImpl(
2222
}
2323
})
2424
.then((res) => {
25-
console.log(res)
26-
2725
if (res.ok) {
2826
return res
2927
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
"lqip-modern": "^1.2.0",
3737
"next": "^12.1.0",
3838
"node-fetch": "^2.6.1",
39-
"notion-client": "^6.0.5",
40-
"notion-types": "^6.0.2",
41-
"notion-utils": "^6.0.5",
39+
"notion-client": "^6.0.6",
40+
"notion-types": "^6.0.6",
41+
"notion-utils": "^6.0.6",
4242
"p-map": "^5.3.0",
4343
"p-memoize": "^6.0.1",
4444
"react": "^17.0.2",
4545
"react-body-classname": "^1.3.1",
4646
"react-dom": "^17.0.2",
4747
"react-icons": "^4.3.1",
48-
"react-notion-x": "^6.0.5",
48+
"react-notion-x": "^6.0.6",
4949
"react-static-tweets": "^0.7.1",
5050
"react-use": "^17.3.2",
5151
"static-tweets": "^0.7.1",

pages/api/search-notion.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
1010

1111
const searchParams: types.SearchParams = req.body
1212

13-
console.log('lambda search-notion', searchParams)
13+
console.log('<<< lambda search-notion', searchParams)
1414
const results = await search(searchParams)
15+
console.log('>>> lambda search-notion', results)
1516

1617
res.setHeader(
1718
'Cache-Control',

site.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
defaultPageCoverPosition: 0.5,
2929

3030
// whether or not to enable support for LQIP preview images (optional)
31-
isPreviewImageSupportEnabled: true,
31+
isPreviewImageSupportEnabled: false,
3232

3333
// whether or not redis is enabled for caching generated preview images (optional)
3434
// NOTE: if you enable redis, you need to set the `REDIS_HOST` and `REDIS_PASSWORD`

yarn.lock

+21-21
Original file line numberDiff line numberDiff line change
@@ -2574,28 +2574,28 @@ normalize-url@^6.0.1:
25742574
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
25752575
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
25762576

2577-
notion-client@^6.0.5:
2578-
version "6.0.5"
2579-
resolved "https://registry.yarnpkg.com/notion-client/-/notion-client-6.0.5.tgz#39991aa21c81aea5580125c29dd92b89ff9c9f76"
2580-
integrity sha512-5xUhwVPfHO/CIqMTK/78qqbnDaXNAhvBz86Gv8PumuveSMLRKgBfQ2QuXgj0F+cTxRoGSA+RZD+s/D31z/sJSg==
2577+
notion-client@^6.0.6:
2578+
version "6.0.6"
2579+
resolved "https://registry.yarnpkg.com/notion-client/-/notion-client-6.0.6.tgz#5a3e6d1ee4675a983d71359df0ab44886d3d00c1"
2580+
integrity sha512-eTN2aDwOfPy2quT76qHO+hwMLUbqXWyshy3uyyc2b+loi8Mxf5b7Lb9duIqowD2fkUH5D3085bM5Tmp2MiMuhQ==
25812581
dependencies:
25822582
got "^11.8.1"
2583-
notion-types "^6.0.2"
2584-
notion-utils "^6.0.5"
2583+
notion-types "^6.0.6"
2584+
notion-utils "^6.0.6"
25852585
p-map "^5.3.0"
25862586

2587-
notion-types@^6.0.2:
2588-
version "6.0.2"
2589-
resolved "https://registry.yarnpkg.com/notion-types/-/notion-types-6.0.2.tgz#23caae984f27eb266377cb257ba467e676510cda"
2590-
integrity sha512-KFc9d+MbqLHh0nh3Tf+XDCizTAMg387Yv9xlSuDWI4V67/FX9ptiByjzHZdglxmgySzgNkN8/EKrTyKO0Kf/EQ==
2587+
notion-types@^6.0.6:
2588+
version "6.0.6"
2589+
resolved "https://registry.yarnpkg.com/notion-types/-/notion-types-6.0.6.tgz#bd97d25119ff3526526f05d3f7b8defb6e593194"
2590+
integrity sha512-SJF6KQvJXjzgaicatcaoDctYWWYxFP/RYUbBFEA3wYuQVprU5U7EwXddBVO6t62xpWmgLX+PKXQc1r+m/mDzCg==
25912591

2592-
notion-utils@^6.0.5:
2593-
version "6.0.5"
2594-
resolved "https://registry.yarnpkg.com/notion-utils/-/notion-utils-6.0.5.tgz#7ba2cfdcb77549c429878e901505c7b44569a198"
2595-
integrity sha512-bdVLH4sHkglaN+mfvjB5wD0zfLQ0rbSvT76dQnp29aemvSIHVBxRAexkwnKhKMlYZsBVksFmtJmWt5Xm9Mw96A==
2592+
notion-utils@^6.0.6:
2593+
version "6.0.6"
2594+
resolved "https://registry.yarnpkg.com/notion-utils/-/notion-utils-6.0.6.tgz#91daf8b721b9c6acaa7cc5e584432e5da964f073"
2595+
integrity sha512-4adrePKC6m6kJ9u4fZI+5zLwdJyTGEGjgTpqU1tSLha/j0fPwBM/EAKaPaG/Ipvuez9tuIafzJS1Z+vkdsfs6Q==
25962596
dependencies:
25972597
is-url-superb "^6.1.0"
2598-
notion-types "^6.0.2"
2598+
notion-types "^6.0.6"
25992599
p-queue "^7.2.0"
26002600

26012601
npm-run-all@^4.1.5:
@@ -3157,10 +3157,10 @@ react-modal@^3.14.3:
31573157
react-lifecycles-compat "^3.0.0"
31583158
warning "^4.0.3"
31593159

3160-
react-notion-x@^6.0.5:
3161-
version "6.0.5"
3162-
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-6.0.5.tgz#a31e604754124290561da4f9f8a1bffc976b7b94"
3163-
integrity sha512-tBKJRRlhQuYcI4jm7UxqekNsPU35t/Hgi6mv6gE2OKXYE5Q8tkHHAr1rlp4zIal8wK9gxbvIfEzOJU+lingh/g==
3160+
react-notion-x@^6.0.6:
3161+
version "6.0.6"
3162+
resolved "https://registry.yarnpkg.com/react-notion-x/-/react-notion-x-6.0.6.tgz#e446db10f21c9c16fc8459a1fc77b0fb5837c598"
3163+
integrity sha512-PURtYGlMkUnkl0HDvi4XDoMQ2Jnc88V3rPULFH3yKXlS/o5laOmDBvfLJP4c8RY7EqW1fHX3iK3lTLD8UZOShA==
31643164
dependencies:
31653165
"@matejmazur/react-katex" "^3.1.3"
31663166
date-fns "^2.15.0"
@@ -3169,8 +3169,8 @@ react-notion-x@^6.0.5:
31693169
katex "^0.13.18"
31703170
lodash.throttle "^4.1.1"
31713171
medium-zoom "^1.0.6"
3172-
notion-types "^6.0.2"
3173-
notion-utils "^6.0.5"
3172+
notion-types "^6.0.6"
3173+
notion-utils "^6.0.6"
31743174
prismjs "^1.27.0"
31753175
rc-dropdown "^3.3.3"
31763176
rc-menu "^9.5.1"

0 commit comments

Comments
 (0)