-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/admin/login #14
base: main
Are you sure you want to change the base?
Feat/admin/login #14
Conversation
Co-authored-by: Sagar Adhikari <sagarjungadhikari19@gmail.com>
* fixed: user registration * feat: added a custom json for testing --------- Co-authored-by: Rahul Mijar <rahul.mijar@trunary.com>
* added: driver type data * feat: added client side pages and components * admin-dashboard-updated * jsondb_updated * map_integrated * fixed:registration and added a login feature * table created * driver_api_created * fixed : driver_table _fixed * added some changes in admin side UI --------- Co-authored-by: Sagar Adhikari <sagarjungadhikari19@gmail.com> Co-authored-by: Rahul Mijar <rahul.mijar@trunary.com>
masm smm m
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this file?
@@ -2,7 +2,7 @@ import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; | |||
import AppLayout from "./client/pages/AppLayout"; | |||
import Home from "./client/pages/Home"; | |||
import Contact from "./client/pages/Contact"; | |||
import Register from "./client/pages/Register"; | |||
// import Register from "./client/pages/Register"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these commented imports.
src/Storemanagement/Store.ts
Outdated
@@ -0,0 +1,14 @@ | |||
|
|||
import{ create} from 'zustand'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's avoid unnecessary spacing.
@@ -0,0 +1,22 @@ | |||
/* eslint-disable react-hooks/rules-of-hooks */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use hooks here. Follow rules of hook and pass "repo" as a prop to this function.
@@ -0,0 +1,105 @@ | |||
// import { useRepository } from '@/hooks/CustomHook'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this file and any other file with commented code only.
if (isAuthorized) { | ||
const accessToken = await this._localStorageClient.getAccessToken(); | ||
_headers.append("Authorization", `Bearer ${accessToken}`); | ||
} | ||
// Configure options for the request | ||
const requestOption: RequestInit = { | ||
// if(body){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code.
{/* Optimize image by specifying dimensions and loading it lazily */} | ||
<img | ||
src="banner.png" | ||
alt="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add an alt property.
// setCurrentForm(2); | ||
navigate("/checkOtp", { | ||
state: { confirmed: confirmation, phone: phone }, | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using eslint-disable from every place.
@@ -1,24 +1,16 @@ | |||
// LocalStorageClient.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're not using this Class through Provider and context, let's delete it.
@@ -1,7 +1,5 @@ | |||
export declare interface IStorageClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this also if not used.
import { useRepository } from "@/hooks/CustomHook"; | ||
import { OnlineDriver } from "@/types/data"; | ||
import _ from "lodash"; | ||
import { useEffect, useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these throwing errors? "useEffect" and "useState" are hooks and can't be used here. Just return the response data received.
No description provided.