gsainfoteam / ziggle-fe

https://ziggle.gistory.me
7 stars 2 forks source link

feat: push notification 15min Modal and Alert #379

Closed enc2586 closed 1 day ago

enc2586 commented 1 month ago

아직 작업이 완료되지 않았습니다. 완료되었습니다.

Summary by CodeRabbit

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago
📝 Walkthrough
📝 Walkthrough ## Walkthrough 이 풀 리퀘스트에서는 여러 파일에 대한 변경 사항이 포함되어 있습니다. `.vscode/settings.json` 파일에 "Swal"이라는 단어가 추가되어 맞춤법 검사 구성이 강화되었습니다. `src/api/notice/notice.ts` 파일에서는 `Notice` 인터페이스에 `publishedAt` 속성이 추가되었으며, `src/api/notice/send-alarm.ts` 파일에는 `sendNoticeAlarm` 함수가 새로 도입되었습니다. 또한, `SendPushNotificationAlert`라는 새로운 React 컴포넌트가 추가되어 푸시 알림 전송과 관련된 기능을 수행합니다. 마지막으로, 여러 언어 파일에서 푸시 알림 관련 번역 항목이 추가되었습니다. ## Changes | 파일 경로 | 변경 요약 | |-----------|-----------| | `.vscode/settings.json` | `cSpell.words` 배열에 "Swal" 추가. | | `src/api/notice/notice.ts` | `Notice` 인터페이스에 `publishedAt: dayjs.Dayjs | string | null` 속성 추가. | | `src/api/notice/send-alarm.ts` | 새로운 함수 `sendNoticeAlarm({ id }: Pick)` 추가. | | `src/app/[lng]/(with-page-layout)/(with-sidebar-layout)/notice/[id]/SendPushNotificationAlert.tsx` | 새로운 React 컴포넌트 `SendPushNotificationAlert` 추가. `id`, `author`, `publishedAt` 속성 수용, `useSession` 훅 사용, 푸시 알림 전송 기능 포함. | | `src/app/[lng]/write/page.tsx` | CSS 임포트 재조정 및 조건문에서 불필요한 괄호 제거. | | `src/app/i18next/locales/en/translation.json` | `"sentPushNotificationAlert"` 섹션 추가, 여러 새로운 키 추가. | | `src/app/i18next/locales/ko/translation.json` | `"sentPushNotificationAlert"` 섹션 추가, 여러 새로운 키 추가. | | `src/app/[lng]/(with-page-layout)/(with-sidebar-layout)/notice/[id]/getTimeDiff.ts` | `isServer` 상수 및 `getTimeDiff` 함수 추가. | | `src/app/[lng]/(with-page-layout)/(with-sidebar-layout)/notice/[id]/page.tsx` | `SendPushAlarm` 컴포넌트 추가. | | `src/app/[lng]/(with-page-layout)/(without-sidebar-layout)/mypage/MypageButton.tsx` | `MypageButtons` 함수 시그니처를 비동기 함수로 변경. | ## Suggested reviewers - dohyun-ko - 2paperstar > 🐰 푸시 알림의 기쁨, > 새로운 컴포넌트가 왔어요! > 알림을 보내는 재미, > 국제화도 잊지 않죠. > 클릭할 수 없던 버튼, > 이제는 독립적으로, > 모두 함께 즐겨요, > 변화의 춤을 추어요! 🎉

📜 Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
📥 Commits Reviewing files that changed from the base of the PR and between c19a24ff85ade55f7627710963ce6be9a0f95e3f and 10a46d188771c0b9e60ae7317c8898ff50ce3262.
📒 Files selected for processing (1) * `src/app/[lng]/(with-page-layout)/(with-sidebar-layout)/notice/[id]/SendPushNotificationAlert.tsx` (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1) * src/app/[lng]/(with-page-layout)/(with-sidebar-layout)/notice/[id]/SendPushNotificationAlert.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 1 month ago

Preview URL: https://ziggle-gib7irkfi-2paperstars-projects.vercel.app

enc2586 commented 1 month ago

@dohyun-ko 아직 완성되진 않았지만, 코드 제공하며 여쭤볼 게 있어서 PR올렸습니다

위 두 사항이 궁금합니다!

github-actions[bot] commented 1 month ago

Preview URL: https://ziggle-71v7oeq13-2paperstars-projects.vercel.app

github-actions[bot] commented 5 days ago

Preview URL: https://ziggle-3ufy5jv02-2paperstars-projects.vercel.app

dohyun-ko commented 5 days ago

@dohyun-ko 아직 완성되진 않았지만, 코드 제공하며 여쭤볼 게 있어서 PR올렸습니다

  • 알림 보내기 요청을 어떤 api로 보내야 하는지
  • 알림 보내기 기능 추가에 따른 isEditable 로직 변경 가능성 (현재는 createdAt에서 15분이 지나면 막는 중 > 알림을 보냈을 경우도 막아야 할 것으로 보임 > how?)

위 두 사항이 궁금합니다!

세상에 이걸 못봤었다니 죄송합니다 ㅠㅠ 2번째는 어제 해결됐고 1번째는 api 문서에서 찾으신거죠??

github-actions[bot] commented 2 days ago

Preview URL: https://ziggle-lxkq9uraf-2paperstars-projects.vercel.app

github-actions[bot] commented 2 days ago

Preview URL: https://ziggle-244dx7h6j-2paperstars-projects.vercel.app

github-actions[bot] commented 2 days ago

Preview URL: https://ziggle-bbjwxh0hj-2paperstars-projects.vercel.app

github-actions[bot] commented 2 days ago

Preview URL: https://ziggle-8r2e244ev-2paperstars-projects.vercel.app

enc2586 commented 1 day ago
github-actions[bot] commented 1 day ago

Preview URL: https://ziggle-ffbxe6qbc-2paperstars-projects.vercel.app

github-actions[bot] commented 1 day ago

Preview URL: https://ziggle-4zd4l60mq-2paperstars-projects.vercel.app