Skip to content
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

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Feat/admin/login #14

wants to merge 45 commits into from

Conversation

sagaradhi19
Copy link
Contributor

No description provided.

Rahul Mijar and others added 30 commits January 24, 2024 17:53
Co-authored-by: Sagar Adhikari <sagarjungadhikari19@gmail.com>
* added: driver type data

* feat: added client side pages and components

---------

Co-authored-by: Sagar Adhikari <sagarjungadhikari19@gmail.com>
* added: driver type data

* feat: added client side pages and components

* admin-dashboard-updated

---------

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

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";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these commented imports.

@@ -0,0 +1,14 @@

import{ create} from 'zustand';

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 */

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';

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){

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=""

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

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

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 {

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';

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants