Complete main UI #37
@@ -1,5 +1,5 @@
|
|||||||
import { getLoginStatus } from '@/utils/auth'
|
|
||||||
import { PRODUCTION_NAME } from '@/constants/common.constants'
|
import { PRODUCTION_NAME } from '@/constants/common.constants'
|
||||||
|
import { getLoginStatus } from '@/utils/auth'
|
||||||
import { getRedirectUrl } from '@/utils/common'
|
import { getRedirectUrl } from '@/utils/common'
|
||||||
|
|
||||||
const AuthRoute = () => {
|
const AuthRoute = () => {
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import '@/assets/css/pages/home-framework.scss'
|
import Icon from '@ant-design/icons'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
import { COLOR_FONT_SECONDARY } from '@/constants/common.constants'
|
||||||
|
import '@/assets/css/pages/home-framework.scss'
|
||||||
import LoadingMask from '@/components/common/LoadingMask'
|
import LoadingMask from '@/components/common/LoadingMask'
|
||||||
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
|
import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar'
|
||||||
import Icon from '@ant-design/icons'
|
|
||||||
import { COLOR_FONT_SECONDARY } from '@/constants/common.constants'
|
|
||||||
import { NavLink } from 'react-router-dom'
|
|
||||||
|
|
||||||
export const HomeFrameworkContext = createContext<{
|
export const HomeFrameworkContext = createContext<{
|
||||||
navbarHiddenState: {
|
navbarHiddenState: {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { login } from '@/utils/auth'
|
|
||||||
import {
|
import {
|
||||||
SYSTEM_LOGIN_SUCCESS,
|
SYSTEM_LOGIN_SUCCESS,
|
||||||
SYSTEM_LOGIN_USERNAME_PASSWORD_ERROR,
|
SYSTEM_LOGIN_USERNAME_PASSWORD_ERROR,
|
||||||
SYSTEM_USER_DISABLE,
|
SYSTEM_USER_DISABLE,
|
||||||
SYSTEM_USERNAME_NOT_FOUND
|
SYSTEM_USERNAME_NOT_FOUND
|
||||||
} from '@/constants/common.constants'
|
} from '@/constants/common.constants'
|
||||||
import { setToken } from '@/utils/common'
|
|
||||||
import '@/assets/css/pages/login.scss'
|
import '@/assets/css/pages/login.scss'
|
||||||
|
import { setToken } from '@/utils/common'
|
||||||
|
import { login } from '@/utils/auth'
|
||||||
|
|
||||||
const Login: React.FC = () => {
|
const Login: React.FC = () => {
|
||||||
const [messageApi, contextHolder] = message.useMessage()
|
const [messageApi, contextHolder] = message.useMessage()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import axios, { type AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
import axios, { type AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||||
import jwtDecode, { JwtPayload } from 'jwt-decode'
|
import jwtDecode, { JwtPayload } from 'jwt-decode'
|
||||||
|
import { message } from 'antd'
|
||||||
import { getToken, removeToken, setToken } from '@/utils/common'
|
import { getToken, removeToken, setToken } from '@/utils/common'
|
||||||
import {
|
import {
|
||||||
SYSTEM_ACCESS_DENIED,
|
SYSTEM_ACCESS_DENIED,
|
||||||
@@ -8,7 +9,6 @@ import {
|
|||||||
SYSTEM_TOKEN_RENEW_SUCCESS,
|
SYSTEM_TOKEN_RENEW_SUCCESS,
|
||||||
SYSTEM_UNAUTHORIZED
|
SYSTEM_UNAUTHORIZED
|
||||||
} from '@/constants/common.constants'
|
} from '@/constants/common.constants'
|
||||||
import { message } from 'antd'
|
|
||||||
|
|
||||||
const service: AxiosInstance = axios.create({
|
const service: AxiosInstance = axios.create({
|
||||||
baseURL: import.meta.env.VITE_API_URL,
|
baseURL: import.meta.env.VITE_API_URL,
|
||||||
|
|||||||
Reference in New Issue
Block a user