Closed hackerwins closed 3 months ago
This update primarily focuses on improving the code's handling of environment variables and enhancing type safety in the front-end codebase. Environment variables have been shifted to use import.meta.env
for better compatibility with Vite. Additionally, function event types in the DocumentList component have been explicitly defined to ensure type safety.
Files | Change Summary |
---|---|
src/App.tsx |
Updated environment variable usage: process.env → import.meta.env . |
src/features/documents/DocumentList.tsx |
Specified event types for handleChangeQuery and handleSearch functions to improve type safety. |
src/pages/ProjectsPage.tsx |
Updated import syntax for BannerSVG and changed href values for environment variable consistency. |
In code so bright, where variables play,
We shift toimport.meta.env
today.
With safer types, our functions grow,
And clarity begins to show.
To Vite we nod, in paths we trust,
A journey in code, precise and just.
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?
What this PR does / why we need it?
Replace CreateReactApp with Vite
This commit updates libraries and replaces CreateReactApp with Vite. Currently dashboard uses React 17, and after being in use for approximately two years, there is a need to upgrade the stack. CreateReactApp is not the recommended approach by React team for now, and Vite is considered the most direct alternative to replace it. Additionally, Jest is replaced by Vitest to align with the technology upgrade.
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist
Summary by CodeRabbit
New Features
Improvements
DocumentList
component.ProjectsPage
component.