-
Notifications
You must be signed in to change notification settings - Fork 140
feat: Migrate Vite.js to Vite + TypeScript & Improve Frontend Setup #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Currently going with the js only. Ig this is not needed now @muntaxir4 |
Typescript in Frontend is absolutely required. Not sure why was it initialized with just JS. Contributors were using next js codes here, and not double checking them. |
|
I have updated all the changed files to Typescript in e8e169c |
|
@muntaxir4 You have tried to resolve all the bugs in one PR, Please make small PRs when addressing bugs and attach a working screenshot |
Okay, I will attach the screenshots. But I did not understand how small PRs will affect this. There will be merge conflicts for this PR, as PRs older than this are merged, so unless I address those changes in this PR, this one won't be merged. I will add commits to resolve all new merge conflicts for PRs merged earlier than this. |
I think you got me wrong, I was saying that this PR is fine but in the future when addressing many bugs make single PR for every bug. This way it is easier for maintainer to review the files and merging can be smooth. |
|
@chandansgowda can you please review this PR? I have resolved all merge conflicts. |
|
Thanks for contributing @muntaxir4 |
It was my pleasure. |
Closes #48
📝 Description
This PR migrates the project from Vite.js (JavaScript) to Vite + TypeScript, ensuring better type safety, maintainability, and scalability as the project grows. Additionally, it includes various frontend improvements, missing component fixes, and TypeScript enhancements.
The project successfully builds after migration, and functionality was tested and compared against the existing JSX version to ensure no breaking changes. And Nextjs type files were updated to refltect Vite.
🔧 Changes Made
✅ Migrated Vite.js to Vite + TypeScript
.ts/.tsx).tsconfig.jsonwith proper compiler options.✅ Installed Tailwind & Setup shadcn Components
✅ Fixed Missing Components
Switch,Textarea,Calendar,Popover.✅ Fixed Router Usage Issues
next/navigationrouter incontract-templatewith react-router-dom’snavigatefor consistency.✅ Improved Auth Context with Proper Types
useContext().✅ Fixed
LinkComponent IssuesBasicDetails,ForgotPassword,Login, andResetPasswordcomponents to usetoinstead ofhref(React Router standard).✅ Added Missing Type Definitions
onChange,onSubmitto properly use TypeScript types.FormEvent,ChangeEventtypes are correctly applied to forms.✅ Successfully Built & Tested
This PR enhances the frontend structure, routing consistency, and developer experience, ensuring a smooth transition to TypeScript with no loss of functionality. 🚀
✅ Checklist
[UPDATE 1, Apr 15 5:49AM IST] : Merge conflicts resolved till #55
-- await was not used in
Login.jsxand useAuth context was previously accessed outside Login component.-- await was not used in Signup.jsx
handleGoogleSignupand login function was not imported from useAuth.package-lock.json