edit login

This commit is contained in:
hamid zarghami
2025-11-12 11:07:16 +03:30
parent 404db3d30a
commit 76a4db8c4e
5 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
VITE_TOKEN_NAME = 'dmnu_a_t'
VITE_REFRESH_TOKEN_NAME = 'dmnu-a-rt'
VITE_BASE_URL = 'https://api.danakcorp.com'
VITE_BASE_URL = 'https://dmenuplus-api.dev.danakcorp.com'
# VITE_BASE_URL = 'http://192.168.1.112:4001'
+1 -1
View File
@@ -99,7 +99,7 @@ const App: FC = () => {
const [isLogin, setIsLogin] = useState<'checking' | 'isLogin' | 'isNotLogin'>('checking')
useEffect(() => {
const token = getToken() || 'test'
const token = getToken()
if (token) {
setIsLogin('isLogin')
} else {
+1 -1
View File
@@ -1,6 +1,6 @@
import { useMutation } from '@tanstack/react-query';
import * as api from '../service/AuthService'
import { CheckHasAccountPhoneType, CheckHasAccountType, LoginWithOtpType, LoginWithPasswordType, OtpVerifyType, RegisterType } from '../types/AuthTypes';
import type { CheckHasAccountPhoneType, CheckHasAccountType, LoginWithOtpType, LoginWithPasswordType, OtpVerifyType, RegisterType } from '../types/AuthTypes';
export const useLoginWithPassword = () => {
return useMutation({
+1 -1
View File
@@ -1,5 +1,5 @@
import { create } from "zustand";
import { AuthStoreType } from "../../auth/types/AuthTypes";
import { type AuthStoreType } from "../../auth/types/AuthTypes";
export const useAuthStore = create<AuthStoreType>((set) => ({
phone: "",
+8 -3
View File
@@ -1,8 +1,13 @@
import React from 'react'
import { type FC } from 'react'
import { Routes, Route } from 'react-router-dom'
import { Pages } from '../config/Pages'
import Login from '../pages/auth/Login'
const Auth = () => {
const Auth: FC = () => {
return (
<div>Auth</div>
<Routes>sa
<Route path={Pages.auth.login} element={<Login />} />
</Routes>
)
}