yorkie-team / dashboard

Dashboard is an administrative tool that allows users to manage projects and documents with ease.
https://yorkie.dev/dashboard/
Apache License 2.0
20 stars 13 forks source link

Keep previous page state #114

Closed mihilt closed 1 year ago

mihilt commented 1 year ago

What this PR does / why we need it?

To keep previous page state in ‘documents’ when it is needed. / It can enhance user experience.

Any background context you want to provide?

This is my first PR in this repository, so I have low understanding of the project. I think maybe this is not the best practice and someone can solve this issue in a better way.

Btw about router’s state property, I could pass only boolean type flag value to prevent data fetching in useEffect. However, for better scalability, I actually passed previous projectName and implemented it comparing with current projectName. This approach will prevent errors if projectName changes only in client-side without using router in the future.

What are the relevant tickets?

Fixes #100

Checklist


I don’t know If I should make additional relevant tests. And I’m not sure this PR didn’t break anything, but maybe it is..

Let me know if someone have any questions or would like me to make any additional revisions.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.