okuda-seminar / Twitter-Clone

0 stars 0 forks source link

[TS] Refactor modal state management using enum for improved clarity #418

Closed a-shigemichi closed 2 months ago

a-shigemichi commented 2 months ago

Issue Number

https://github.com/okuda-seminar/Twitter-Clone/issues/417

Implementation Summary

About ts/twitter/src/app/posts/page.tsx, I removed the previously used variable 'isOpen' and replaced it with 'modalState', which can take one of the following values: Closed, PostModalOpen, or SignInPromptOpen. We implemented a modalState using an enum in page.tsx because it contains two Modals. However, we decided not to change the isOpen variable in each Modal file because it manages the open state of only one Modal within the file. We judged that using isOpen in this context would not confuse.

Schedule

2024/9/13