Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] react notion x 및 NotionRender 업데이트 #174

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

itjustbong
Copy link
Contributor

Description

📌 개발환경에서 getPosts()가 자주 호출되는 것을 피하고자했습니다.

  • getPosts()에서 전역변수를 활용하여 메인 페이지는 추가 요청없이 캐싱(?)되도록 하였습니다.
  • 어차피 getStaticPaths() 때문에 상세페이지에서는 거의 계속 호출되지만...

📌 react-notion-x 를 업데이트 하였습니다.

  • 이미지가 캐싱이 안되어 찾아보니, 우선 next/image가 notionrender 에서 적용이 안되고 있었습니다.
  • 해당 문제를 해결하기 위해 해당 패키지를 업데이트하고, 추가적으로 dynamic을 통해 components를 import하도록 하였습니다.
  • 해당 사항 적용을 통해 캐싱이 되는 것을 확인하였습니다.

스크린샷 2023-04-26 오후 10 47 24

Related tickets

PR Checklist

@vercel
Copy link

vercel bot commented Apr 26, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @morethanmin on Vercel.

@morethanmin first needs to authorize it.

@vercel
Copy link

vercel bot commented Apr 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
morethan-log ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 1:54pm

Copy link
Owner

@morethanmin morethanmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요! 작업해주신 내용 확인했습니다.

다만 캐싱같은 경우 production에서는 revalidate time을 늘리면 될 것 같고, local에서는 global state로 관리하는 방향으로 개선해나가면 좋을 것 같습니다.

만들고 계신 블로그도 잘 봤습니다. 감사합니다 :)

@morethanmin morethanmin merged commit f0220d5 into morethanmin:main Apr 26, 2023
@itjustbong
Copy link
Contributor Author

itjustbong commented Apr 26, 2023

안녕하세요! 작업해주신 내용 확인했습니다.

다만 캐싱같은 경우 production에서는 revalidate time을 늘리면 될 것 같고, local에서는 global state로 관리하는 방향으로 개선해나가면 좋을 것 같습니다.

만들고 계신 블로그도 잘 봤습니다. 감사합니다 :)

안녕하세요!
revalidate time의 존재를 이제서야 알았습니다...ㅎㅎ

morethanmin님께서 작업해주신 프로젝트 덕분에 블로그를 차근차근 만들어가고 있습니다.
정말 감사합니다 😀

그리고 자꾸 노션 이미지가 로딩이 안되거나 엄청 느리게 로딩되는 경우가 많이 있는데,
morethanmin님께서는 해당 문제가 없으신지 궁금합니다.
그래서 이미지가 로딩 문제를 해결하고자 cloudinary 를 활용해서,
중간에 이미지를 캐싱해보고자 하는데 다른 좋은 방법이 있을까요?

또한 개발 환경에서 느린 Notion API 덕분에 개발 중 페이지 이동이 너무 느린데,
해당 문제를 혹시 해결할 방법이나 아이디어가 있을까요?

질문이 많았네요..ㅎ
아무쪼록 morethan-log 너무 잘 사용하고 있습니다.
감사합니다!

gusleyva added a commit to gusleyva/c4cydonia-vercel-blog that referenced this pull request Dec 17, 2023
* feat: update favicon and icon

* adding post author  (morethanmin#41)

* feat: update typescript

* fix: build error

* refactor: refactoring code

* refactor: refactoring code

* chore: update config

* chore: update README.md

* feat: updating author property

* Adding mobile profile section, Updating README (morethanmin#44)

* refactor: refactoring code

* refactor: refactoring code

* feat: adding responsive profile component

* fix: disable profile info

* feat: add bio and role

* chore: update README.md

* feat: mobile view

* feat: darkmode color

* chore: update config

* chore: update config

* Adding Post Custom Thumbnail (morethanmin#56)

* refactor: refactoring code

* refactor: refactoring code

* feat: adding responsive profile component

* fix: disable profile info

* feat: add bio and role

* chore: update README.md

* feat: mobile view

* feat: darkmode color

* fix: setting orderby variable

* feat: add thumbnail

* fix: build error

* fix: build error

* Adding Error Page, Fixing Some Issue (morethanmin#63)

* feat: add profile in post card component

* feat: style post header

* fix: updating profile_photo undefind check

* feat: adding 404 page

* feat: adding thumbnail in post detail page

* fix: using default next image loader

* fix: fixing user name issue

* Workflow Changes + Refactoring (morethanmin#67)

* feat: add prettier config file

* refactor: Move config files to site.config

* feat: Updated the Pull request template

* feat: Add Bug report Form

* feat: Updated the bug_report template

* feat: Updated code of conduct

* feat: Updated Contributing Docs

* feat: update Pull Request template

* fix: adding image domain (morethanmin#71)

* [Fix] notion-toggle 내부 element overflow 해결 (morethanmin#68)

* Bugfix: notion-toggle 내부 element overflow 해결

* Refactor: delete useless important

* [DOCUMENTATION] Documentation Updates (morethanmin#73)

* chore: move 2 files, update 2 files and delete 1 file

* docs: update PULL_REQUEST_TEMPLATE.md

* feat: update Footer.tsx

* feat: support mermaid digram  close morethanmin#77 (morethanmin#78)

* [REFACTOR] refactoring code (morethanmin#79)

* refactor: adding mermaid hook

* refactor: adding some type, refactoring get post

* chore: update config

* refactor: refactoring detail page

* feat: changing font (morethanmin#80)

* [UPDATE] tailwind.config.js (morethanmin#84)

* chore: update document

* chore: add contributors and sponsors

* docs: add contributors

* [FIX] no notion profile photo error (morethanmin#97)

* fix: no notion profile photo error (morethanmin#91)

* chore: change profile image src path to const

* docs: update contributors

* docs: update FUNDING.yml

* [FEAT] add cusdis comment support (morethanmin#103)

* feat: add cusdis feature

* docs: add cusdis to readme

* docs: update contributors

* fix: make cusdis theme same to blog theme (morethanmin#107)

* fix not applied fonts "Pretendard" (morethanmin#114)

* docs: update contributors

* typo: fix typo (morethanmin#120)

* docs: update contributors

* [FEAT] add "category" property (morethanmin#122)

* feat: add category

* feat: update coloring logic

* fix: update tailwind

* fix: add category readOnly props

* feat: add category inputs

* fix: category ui issue

* fix: typo

* [FIX] category overflow issue (morethanmin#123)

* feat: add category

* feat: update coloring logic

* fix: update tailwind

* fix: add category readOnly props

* feat: add category inputs

* fix: category ui issue

* fix: typo

* fix: navbar z-index

* fix: fix typo (TPostStatus) (morethanmin#132)

* fix: table notion overflow on mobile (morethanmin#144)

* docs: update contributors

* change to overflow auto (morethanmin#145)

* Fix:google analytics not working even though I have add ga id correctly (morethanmin#146)

* rename all env use in next build to NEXT_PUBLIC_

* fix document

* feat: ✨ adding sticky section (morethanmin#163)

* chore: 📦 update notion-client (morethanmin#171)

* [FEAT] react notion x 및 NotionRender 업데이트 (morethanmin#174)

* Feat: getPosts 요청 감소 로직 추가

* Feat: react-notion-x 업데이트 및 NotionRederer 수정

* build: 📦 update package

* feat: ✨ update background color

* [FIX] Notion Token Error (morethanmin#185)

* feat: add `index.d.ts` to declare `prismjs`

* feat: add code token recognition for multiple languages

* chore: add contributor

* chore: fix readme.md

* Update README.md (morethanmin#199)

Add user guide in english

* fix: fix serviceCard (morethanmin#238)

* chore: update readme.md

* [Feat] on demand revalidate api (morethanmin#224)

* feat: upgrade next, react, react-dom

* fix: remove a tag in link tag

- for next13

* chore: revalidateTime to confing

* feat: on demand revalidate api 추가

* doc: revalidate api 설명 주석 추가

* [FEAT] migrate emotion to tailwind (morethanmin#246)

* feat: update next.js

* feat: install emotion

* feat: convert layout style

* refactor: rename containers folder

* feat: convert category css

* feat: convert feed, taglist style

* feat: convert MobileProfileCard style

* feat: convert feed style

* feat: convert feed page style

* feat: ✨ remove tailwind

* feat: ✨ add themeProvider

* refactor: refactor structure

* refactor: refactor structure

* feat: darkmode

* feat: update theme

* fix: fix build error

* fix: fix post card ui (morethanmin#247)

* fix: fix comment darkmode (morethanmin#248)

* fix: fix tag background color

* fix: refactor comment box

* feat: improve notion css

* refactor: refactor error page

* refactor: refactor api

* refactor: ♻️ update meta config

* feat: refactoring ssr using react query

* fix: fix build error

* fix: remove console.log

* fix: set queryKey argument

* fix: fix default category not visible

* fix: fix type error

* feat: update feed ui

* feat: change utterances value

* FIX :: color set code to use record

* fix: change utterances value (morethanmin#271)

* docs: update readme.md

* docs: update README.md

* chore: update README.md

* feat: naver site verification

* Update site.config.js

* revert site.config.js

* clarification to README.md

* 20231217 - Download latest updates

---------

Co-authored-by: front_이상민 <[email protected]>
Co-authored-by: Lee Sang Min <[email protected]>
Co-authored-by: Vaishak Kaippanchery <[email protected]>
Co-authored-by: JaeSang1998 <[email protected]>
Co-authored-by: Obaid Al Teneiji <[email protected]>
Co-authored-by: Jinhwan Kim <[email protected]>
Co-authored-by: morethanmin <[email protected]>
Co-authored-by: itjustbong <[email protected]>
Co-authored-by: 도다 <[email protected]>
Co-authored-by: lisiver <[email protected]>
Co-authored-by: Octoping <[email protected]>
Co-authored-by: Octoping <[email protected]>
Co-authored-by: linnil <[email protected]>
Co-authored-by: 홍승현 <[email protected]>
Co-authored-by: halang <[email protected]>
Co-authored-by: SEOKKAMONI <[email protected]>
Co-authored-by: Randall <[email protected]>
Co-authored-by: Yongjun Cho <[email protected]>
Co-authored-by: Evelyn Gaskin <[email protected]>
Co-authored-by: Gustavo Leyva <[email protected]>
cheongsan pushed a commit to cheongsan/blog that referenced this pull request Dec 12, 2024
* Feat: getPosts 요청 감소 로직 추가

* Feat: react-notion-x 업데이트 및 NotionRederer 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants