First of all issue #282 second of all issue #275.
Why is issue 275 here again? Well i fucked up something with my fork last time...
🤖 Generated by Copilot at 29e6335
Summary
🪄🚀🎨
This pull request refactors the dashboard feature of the rogue-thi-app by using a context and a hook to manage and share the dashboard state across components. It also removes an unused dependency, marks another one as optional, and fixes some minor UI issues. The affected files are DashboardModal.js, package-lock.json, _app.js, index.js, and personal.js.
Walkthrough
Remove moment dependency and add optional and peer properties to react dependency in package-lock.json (link,link)
Create and export DashboardContext in _app.js to provide dashboard state and actions to other components (link)
Import and use useDashboard hook in _app.js and destructure its values into variables (link,link)
Wrap DashboardContext.Provider around Head and Component in _app.js and pass dashboard state and actions as value prop (link)
Remove import of useDashboard hook from DashboardModal.js and index.js as it is no longer needed (link,link)
Import and use DashboardContext in DashboardModal.js and index.js to access dashboard state and actions from context provider (link,link)
Fix indentation of CopyableField components in personal.js to improve code readability and consistency (link,link)
Change rows prop of ReactPlaceholder component in personal.js to reduce placeholder height and avoid scrolling (link)
Move PersonalDataModal component in personal.js to render only when user data is available or user is not a student (link)
Okay here are multiple errors fixed:
First of all issue #282 second of all issue #275. Why is issue 275 here again? Well i fucked up something with my fork last time...
🤖 Generated by Copilot at 29e6335
Summary
🪄🚀🎨
This pull request refactors the dashboard feature of the rogue-thi-app by using a context and a hook to manage and share the dashboard state across components. It also removes an unused dependency, marks another one as optional, and fixes some minor UI issues. The affected files are
DashboardModal.js
,package-lock.json
,_app.js
,index.js
, andpersonal.js
.Walkthrough
moment
dependency and addoptional
andpeer
properties toreact
dependency inpackage-lock.json
(link,link)DashboardContext
in_app.js
to provide dashboard state and actions to other components (link)useDashboard
hook in_app.js
and destructure its values into variables (link,link)DashboardContext.Provider
aroundHead
andComponent
in_app.js
and pass dashboard state and actions as value prop (link)useDashboard
hook fromDashboardModal.js
andindex.js
as it is no longer needed (link,link)DashboardContext
inDashboardModal.js
andindex.js
to access dashboard state and actions from context provider (link,link)CopyableField
components inpersonal.js
to improve code readability and consistency (link,link)rows
prop ofReactPlaceholder
component inpersonal.js
to reduce placeholder height and avoid scrolling (link)PersonalDataModal
component inpersonal.js
to render only when user data is available or user is not a student (link)