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

[Fix] 동적 Index html #261

Merged
merged 8 commits into from
Jul 29, 2024
Merged

[Fix] 동적 Index html #261

merged 8 commits into from
Jul 29, 2024

Conversation

lydiacho
Copy link
Member

Related Issue : Closes #223


🧑‍🎤 Summary

react-helmet-async 라이브러리 사용해서 메이커스 여부에 따라 동적으로 head 태그 구현해줬습니다

🧑‍🎤 Screenshot

image

🧑‍🎤 Comment

  • react-helmet-async 써서 구현해주었어요
  • 어디에 넣어줄까 고민하다가 최상위 route element인 Layout 컴포넌트 내부에서 그냥 바로 만들어서 넣어주었습니다 (분리할까요?)
  • index.html head 태그에서 분기처리 할만한 것들 다 옮겨다놨어요!
  • RecruitingInfoContext에서 seasonisMakers 데이터 가져다가 사용하는데, 불러오는 시간 때문에 페이지 로딩시간 동안 title에 undefined 기 모집 이렇게 undefined가 섞여나오더라고요? 그게 너무 보기 싫어서 아직 안불러와졌을 때 (데이터 undefined일때) 보여줄 디폴트 텍스트 따로 설정하였습니다
const TITLE = season === undefined ? 'SOPT 모집 지원하기' : `SOPT ${isMakers && 'makers '}${season}기 모집 지원하기`;
  • 동규오빠가 언급해준대로 Makers -> makers 대소문자 구분해주어야 해서, Makers 워딩 하드하게 사용되고 있는 곳도 makers로 바꿔주었습니다.

@lydiacho lydiacho self-assigned this Jul 29, 2024
Copy link

height bot commented Jul 29, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

cloudflare-workers-and-pages bot commented Jul 29, 2024

Deploying sopt-recruiting-frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: afc59d6
Status: ✅  Deploy successful!
Preview URL: https://58eb64e8.sopt-recruiting-frontend.pages.dev
Branch Preview URL: https://fix--223-indexhtml.sopt-recruiting-frontend.pages.dev

View logs

Copy link
Member

@eonseok-jeon eonseok-jeon left a comment

Choose a reason for hiding this comment

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

고생하셨습니두~~~

아 그리고 저희 branch name 은 camelCase가 아니고 kebab-case 이지 않았나유?

<meta property="og:locale" content="ko_KR" />
<!-- <meta property="og:url" content="https://www.someurl.com" /> -->
Copy link
Member

Choose a reason for hiding this comment

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

이제는 url도 추가해줄 수 있어요~

https://recruiting.sopt.org

<meta property="twitter:card" content="website" />
<meta name="twitter:title" content="SOPT 35기 모집 지원하기" />
<meta name="twitter:description" content="SOPT의 신입 기수 모집페이지입니다." />
<!-- <meta property="twitter:site" content="https://www.someurl.com" /> -->
Copy link
Member

Choose a reason for hiding this comment

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

여기도요

@lydiacho
Copy link
Member Author

@eonseok-jeon url 태그 추가했습니다! 브랜치 전략은 네네 kebab 맞는데 제가 앱잼하고 와서 혼동했네요 ㅠㅠ
어차피 머지하면 브랜치 삭제되니까 별도로 수정은 안하고 다음부터 유의해서 네이밍하겠습니다 :)

@lydiacho lydiacho merged commit 416d443 into develop Jul 29, 2024
1 check passed
@lydiacho lydiacho deleted the fix/#223_indexHtml branch July 29, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] index.html 동적 처리
2 participants