Fix can not autoload in production mode bug

This commit is contained in:
2024-01-15 15:57:48 +08:00
parent bcf29f74ef
commit 6d08e1a8e8
24 changed files with 36 additions and 57 deletions

View File

@@ -1,4 +1,3 @@
import { useUpdatedEffect } from '@/util/hooks'
import '@/components/Playground/Output/Preview/preview.scss' import '@/components/Playground/Output/Preview/preview.scss'
import { IFiles, IImportMap } from '@/components/Playground/shared' import { IFiles, IImportMap } from '@/components/Playground/shared'
import Compiler from '@/components/Playground/compiler' import Compiler from '@/components/Playground/compiler'
@@ -52,7 +51,7 @@ const Preview = ({ iframeKey, files, importMap }: PreviewProps) => {
} }
} }
useUpdatedEffect(() => { useEffect(() => {
window.addEventListener('message', handleMessage) window.addEventListener('message', handleMessage)
return () => { return () => {
@@ -60,7 +59,7 @@ const Preview = ({ iframeKey, files, importMap }: PreviewProps) => {
} }
}, []) }, [])
useUpdatedEffect(() => { useEffect(() => {
Compiler.compile(files, importMap) Compiler.compile(files, importMap)
.then((result) => { .then((result) => {
if (loaded) { if (loaded) {
@@ -70,7 +69,7 @@ const Preview = ({ iframeKey, files, importMap }: PreviewProps) => {
} as IMessage) } as IMessage)
} }
}) })
.catch((e) => { .catch((e: Error) => {
setErrorMsg(`编译失败:${e.message}`) setErrorMsg(`编译失败:${e.message}`)
}) })
}, [files, Compiler, loaded]) }, [files, Compiler, loaded])

View File

@@ -1,6 +1,7 @@
[data-component=playground-preview] { [data-component=playground-preview] {
display: flex; display: flex;
position: relative; position: relative;
iframe { iframe {
border: none; border: none;
flex: 1; flex: 1;

View File

@@ -1,7 +1,6 @@
import MonacoEditor from '@monaco-editor/react' import MonacoEditor from '@monaco-editor/react'
import { Loader } from 'esbuild-wasm' import { Loader } from 'esbuild-wasm'
import '@/components/Playground/Output/Transform/transform.scss' import '@/components/Playground/Output/Transform/transform.scss'
import { useUpdatedEffect } from '@/util/hooks'
import { IFile, ITheme } from '@/components/Playground/shared' import { IFile, ITheme } from '@/components/Playground/shared'
import { cssToJs, jsonToJs, addReactImport } from '@/components/Playground/files' import { cssToJs, jsonToJs, addReactImport } from '@/components/Playground/files'
import Compiler from '@/components/Playground/compiler' import Compiler from '@/components/Playground/compiler'
@@ -32,7 +31,7 @@ const Transform = ({ file, theme }: OutputProps) => {
}) })
} }
useUpdatedEffect(() => { useEffect(() => {
if (file) { if (file) {
try { try {
const code = file.value const code = file.value

View File

@@ -1,5 +1,4 @@
import '@/components/Playground/playground.scss' import '@/components/Playground/playground.scss'
import { useUpdatedEffect } from '@/util/hooks'
import { IFiles, IImportMap, ITsconfig } from '@/components/Playground/shared' import { IFiles, IImportMap, ITsconfig } from '@/components/Playground/shared'
import { import {
IMPORT_MAP_FILE_NAME, IMPORT_MAP_FILE_NAME,
@@ -54,7 +53,7 @@ const Playground = ({ initFiles, initImportMapRaw, initTsconfigRaw }: Playground
setFiles(files) setFiles(files)
} }
useUpdatedEffect(() => { useEffect(() => {
try { try {
setImportMap(JSON.parse(importMapRaw) as IImportMap) setImportMap(JSON.parse(importMapRaw) as IImportMap)
} catch (e) { } catch (e) {
@@ -62,7 +61,7 @@ const Playground = ({ initFiles, initImportMapRaw, initTsconfigRaw }: Playground
} }
}, [importMapRaw]) }, [importMapRaw])
useUpdatedEffect(() => { useEffect(() => {
try { try {
setTsconfig(JSON.parse(tsconfigRaw) as ITsconfig) setTsconfig(JSON.parse(tsconfigRaw) as ITsconfig)
} catch (e) { } catch (e) {
@@ -76,12 +75,12 @@ const Playground = ({ initFiles, initImportMapRaw, initTsconfigRaw }: Playground
tsconfig={tsconfig} tsconfig={tsconfig}
files={{ files={{
...files, ...files,
'import-map.json': { [IMPORT_MAP_FILE_NAME]: {
name: IMPORT_MAP_FILE_NAME, name: IMPORT_MAP_FILE_NAME,
language: 'json', language: 'json',
value: importMapRaw value: importMapRaw
}, },
'tsconfig.json': { [TS_CONFIG_FILE_NAME]: {
name: TS_CONFIG_FILE_NAME, name: TS_CONFIG_FILE_NAME,
language: 'json', language: 'json',
value: tsconfigRaw value: tsconfigRaw

View File

@@ -1,7 +1,6 @@
import Icon from '@ant-design/icons' import Icon from '@ant-design/icons'
import { COLOR_ERROR } from '@/constants/common.constants' import { COLOR_ERROR } from '@/constants/common.constants'
import { getRedirectUrl } from '@/util/route' import { getRedirectUrl } from '@/util/route'
import { useUpdatedEffect } from '@/util/hooks'
import { getAvatar, getLoginStatus, getNickname, removeToken } from '@/util/auth' import { getAvatar, getLoginStatus, getNickname, removeToken } from '@/util/auth'
import { r_auth_logout } from '@/services/auth' import { r_auth_logout } from '@/services/auth'
@@ -42,7 +41,7 @@ const Footer = () => {
const loginStatus = getLoginStatus() const loginStatus = getLoginStatus()
useUpdatedEffect(() => { useEffect(() => {
if (getLoginStatus()) { if (getLoginStatus()) {
void getNickname().then((nickname) => { void getNickname().then((nickname) => {
setNickname(nickname) setNickname(nickname)

View File

@@ -8,7 +8,6 @@ import {
PERMISSION_USER_NOT_FOUND, PERMISSION_USER_NOT_FOUND,
SYSTEM_INVALID_CAPTCHA_CODE SYSTEM_INVALID_CAPTCHA_CODE
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { r_auth_forget, r_auth_retrieve } from '@/services/auth' import { r_auth_forget, r_auth_retrieve } from '@/services/auth'
import FitCenter from '@/components/common/FitCenter' import FitCenter from '@/components/common/FitCenter'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
@@ -45,7 +44,7 @@ const Forget = () => {
const [captchaCode, setCaptchaCode] = useState('') const [captchaCode, setCaptchaCode] = useState('')
const [retrieveCaptchaCode, setRetrieveCaptchaCode] = useState('') const [retrieveCaptchaCode, setRetrieveCaptchaCode] = useState('')
useUpdatedEffect(() => { useEffect(() => {
if (!isSending) { if (!isSending) {
setCaptchaCode('') setCaptchaCode('')
turnstileRef.current?.reset() turnstileRef.current?.reset()
@@ -53,7 +52,7 @@ const Forget = () => {
} }
}, [isSending]) }, [isSending])
useUpdatedEffect(() => { useEffect(() => {
if (!isChanging) { if (!isChanging) {
setRetrieveCaptchaCode('') setRetrieveCaptchaCode('')
retrieveTurnstileRef.current?.reset() retrieveTurnstileRef.current?.reset()

View File

@@ -8,7 +8,6 @@ import {
PERMISSION_USERNAME_NOT_FOUND, PERMISSION_USERNAME_NOT_FOUND,
SYSTEM_INVALID_CAPTCHA_CODE SYSTEM_INVALID_CAPTCHA_CODE
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { getUserInfo, setToken } from '@/util/auth' import { getUserInfo, setToken } from '@/util/auth'
import { utcToLocalTime } from '@/util/datetime' import { utcToLocalTime } from '@/util/datetime'
import { r_auth_login } from '@/services/auth' import { r_auth_login } from '@/services/auth'
@@ -33,7 +32,7 @@ const SignIn = () => {
const [isSigningIn, setIsSigningIn] = useState(false) const [isSigningIn, setIsSigningIn] = useState(false)
const [captchaCode, setCaptchaCode] = useState('') const [captchaCode, setCaptchaCode] = useState('')
useUpdatedEffect(() => { useEffect(() => {
if (!isSigningIn) { if (!isSigningIn) {
setCaptchaCode('') setCaptchaCode('')
turnstileRef.current?.reset() turnstileRef.current?.reset()

View File

@@ -7,7 +7,6 @@ import {
SYSTEM_INVALID_CAPTCHA_CODE, SYSTEM_INVALID_CAPTCHA_CODE,
SYSTEM_MATCH_SENSITIVE_WORD SYSTEM_MATCH_SENSITIVE_WORD
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { getLoginStatus, setToken } from '@/util/auth' import { getLoginStatus, setToken } from '@/util/auth'
import { r_auth_register, r_auth_resend } from '@/services/auth' import { r_auth_register, r_auth_resend } from '@/services/auth'
import FitCenter from '@/components/common/FitCenter' import FitCenter from '@/components/common/FitCenter'
@@ -32,7 +31,7 @@ const SignUp = () => {
const [isSending, setIsSending] = useState(false) const [isSending, setIsSending] = useState(false)
const [captchaCode, setCaptchaCode] = useState('') const [captchaCode, setCaptchaCode] = useState('')
useUpdatedEffect(() => { useEffect(() => {
if (!isSigningUp) { if (!isSigningUp) {
setCaptchaCode('') setCaptchaCode('')
turnstileRef.current?.reset() turnstileRef.current?.reset()
@@ -40,7 +39,7 @@ const SignUp = () => {
} }
}, [isSigningUp]) }, [isSigningUp])
useUpdatedEffect(() => { useEffect(() => {
if (location.pathname !== '/register') { if (location.pathname !== '/register') {
return return
} }

View File

@@ -5,7 +5,6 @@ import {
PERMISSION_VERIFY_SUCCESS, PERMISSION_VERIFY_SUCCESS,
SYSTEM_MATCH_SENSITIVE_WORD SYSTEM_MATCH_SENSITIVE_WORD
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { getLoginStatus, getUserInfo, requestUserInfo } from '@/util/auth' import { getLoginStatus, getUserInfo, requestUserInfo } from '@/util/auth'
import { getRedirectUrl } from '@/util/route' import { getRedirectUrl } from '@/util/route'
import { r_auth_resend, r_auth_verify } from '@/services/auth' import { r_auth_resend, r_auth_verify } from '@/services/auth'
@@ -26,7 +25,7 @@ const Verify = () => {
const [avatar, setAvatar] = useState('') const [avatar, setAvatar] = useState('')
const [isVerifying, setIsVerifying] = useState(false) const [isVerifying, setIsVerifying] = useState(false)
useUpdatedEffect(() => { useEffect(() => {
if (location.pathname !== '/verify') { if (location.pathname !== '/verify') {
return return
} }

View File

@@ -1,5 +1,4 @@
import '@/assets/css/pages/sign.scss' import '@/assets/css/pages/sign.scss'
import { useUpdatedEffect } from '@/util/hooks'
import FitFullscreen from '@/components/common/FitFullscreen' import FitFullscreen from '@/components/common/FitFullscreen'
import FitCenter from '@/components/common/FitCenter' import FitCenter from '@/components/common/FitCenter'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
@@ -16,7 +15,7 @@ const Sign = () => {
const leftPage = ['register', 'verify', 'forget'] const leftPage = ['register', 'verify', 'forget']
useUpdatedEffect(() => { useEffect(() => {
lastPage.current = currentPage.current lastPage.current = currentPage.current
currentPage.current = match.id currentPage.current = match.id

View File

@@ -10,7 +10,6 @@ import {
DATABASE_SELECT_SUCCESS, DATABASE_SELECT_SUCCESS,
DATABASE_UPDATE_SUCCESS DATABASE_UPDATE_SUCCESS
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { hasPermission } from '@/util/auth' import { hasPermission } from '@/util/auth'
import { utcToLocalTime } from '@/util/datetime' import { utcToLocalTime } from '@/util/datetime'
import { import {
@@ -484,7 +483,7 @@ const Group = () => {
} }
}, [formValues]) }, [formValues])
useUpdatedEffect(() => { useEffect(() => {
getGroup() getGroup()
}, [ }, [
JSON.stringify(tableParams.filters), JSON.stringify(tableParams.filters),

View File

@@ -1,7 +1,6 @@
import { ChangeEvent, KeyboardEvent } from 'react' import { ChangeEvent, KeyboardEvent } from 'react'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { COLOR_FONT_SECONDARY, DATABASE_SELECT_SUCCESS } from '@/constants/common.constants' import { COLOR_FONT_SECONDARY, DATABASE_SELECT_SUCCESS } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { dayjsToUtc, utcToLocalTime } from '@/util/datetime' import { dayjsToUtc, utcToLocalTime } from '@/util/datetime'
import { r_sys_log_get } from '@/services/system' import { r_sys_log_get } from '@/services/system'
import FitFullscreen from '@/components/common/FitFullscreen' import FitFullscreen from '@/components/common/FitFullscreen'
@@ -223,7 +222,7 @@ const Log = () => {
}) })
} }
useUpdatedEffect(() => { useEffect(() => {
getLog() getLog()
}, [ }, [
JSON.stringify(tableParams.filters), JSON.stringify(tableParams.filters),

View File

@@ -10,7 +10,6 @@ import {
DATABASE_SELECT_SUCCESS, DATABASE_SELECT_SUCCESS,
DATABASE_UPDATE_SUCCESS DATABASE_UPDATE_SUCCESS
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { utcToLocalTime } from '@/util/datetime' import { utcToLocalTime } from '@/util/datetime'
import { hasPermission, powerListToPowerTree } from '@/util/auth' import { hasPermission, powerListToPowerTree } from '@/util/auth'
import { import {
@@ -493,7 +492,7 @@ const Role = () => {
} }
}, [formValues]) }, [formValues])
useUpdatedEffect(() => { useEffect(() => {
getRole() getRole()
}, [ }, [
JSON.stringify(tableParams.filters), JSON.stringify(tableParams.filters),

View File

@@ -1,4 +1,3 @@
import { useUpdatedEffect } from '@/util/hooks'
import { hasPermission } from '@/util/auth' import { hasPermission } from '@/util/auth'
import { r_sys_settings_base_get, r_sys_settings_base_update } from '@/services/system' import { r_sys_settings_base_get, r_sys_settings_base_update } from '@/services/system'
import { SettingsCard } from '@/pages/System/Settings' import { SettingsCard } from '@/pages/System/Settings'
@@ -40,7 +39,7 @@ const Base = () => {
}) })
} }
useUpdatedEffect(() => { useEffect(() => {
getBaseSettings() getBaseSettings()
}, []) }, [])

View File

@@ -1,5 +1,4 @@
import Icon from '@ant-design/icons' import Icon from '@ant-design/icons'
import { useUpdatedEffect } from '@/util/hooks'
import { hasPermission } from '@/util/auth' import { hasPermission } from '@/util/auth'
import { import {
r_sys_settings_mail_get, r_sys_settings_mail_get,
@@ -95,7 +94,7 @@ const Mail = () => {
}) })
} }
useUpdatedEffect(() => { useEffect(() => {
getMailSettings() getMailSettings()
}, []) }, [])

View File

@@ -1,7 +1,6 @@
import { ChangeEvent } from 'react' import { ChangeEvent } from 'react'
import Icon from '@ant-design/icons' import Icon from '@ant-design/icons'
import { DATABASE_DUPLICATE_KEY, DATABASE_INSERT_SUCCESS } from '@/constants/common.constants' import { DATABASE_DUPLICATE_KEY, DATABASE_INSERT_SUCCESS } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { import {
r_sys_settings_sensitive_add, r_sys_settings_sensitive_add,
r_sys_settings_sensitive_delete, r_sys_settings_sensitive_delete,
@@ -95,7 +94,7 @@ const SensitiveWord = () => {
}) })
} }
useUpdatedEffect(() => { useEffect(() => {
getSensitiveWordSettings() getSensitiveWordSettings()
}, []) }, [])

View File

@@ -1,6 +1,5 @@
import Icon from '@ant-design/icons' import Icon from '@ant-design/icons'
import * as echarts from 'echarts/core' import * as echarts from 'echarts/core'
import { useUpdatedEffect } from '@/util/hooks'
import { getTimesBetweenTwoTimes } from '@/util/datetime' import { getTimesBetweenTwoTimes } from '@/util/datetime'
import { r_sys_statistics_active } from '@/services/system' import { r_sys_statistics_active } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
@@ -13,7 +12,7 @@ const ActiveInfo = () => {
const [isLoading, setIsLoading] = useState(false) const [isLoading, setIsLoading] = useState(false)
const [scope, setScope] = useState('WEAK') const [scope, setScope] = useState('WEAK')
useUpdatedEffect(() => { useEffect(() => {
const chartResizeObserver = new ResizeObserver(() => { const chartResizeObserver = new ResizeObserver(() => {
activeInfoEChartsRef.current?.resize() activeInfoEChartsRef.current?.resize()
}) })
@@ -25,7 +24,7 @@ const ActiveInfo = () => {
} }
}, [isLoading]) }, [isLoading])
useUpdatedEffect(() => { useEffect(() => {
getActiveInfo() getActiveInfo()
}, []) }, [])

View File

@@ -1,6 +1,5 @@
import * as echarts from 'echarts/core' import * as echarts from 'echarts/core'
import { BarSeriesOption } from 'echarts/charts' import { BarSeriesOption } from 'echarts/charts'
import { useUpdatedEffect } from '@/util/hooks'
import { r_sys_statistics_cpu } from '@/services/system' import { r_sys_statistics_cpu } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
import { import {
@@ -26,7 +25,7 @@ const CPUInfo = () => {
} }
} }
useUpdatedEffect(() => { useEffect(() => {
const chartResizeObserver = new ResizeObserver(() => { const chartResizeObserver = new ResizeObserver(() => {
cpuInfoEChartsRef.current.forEach((value) => value.resize()) cpuInfoEChartsRef.current.forEach((value) => value.resize())
}) })
@@ -38,7 +37,7 @@ const CPUInfo = () => {
} }
}, [cpuInfoDivRef.current]) }, [cpuInfoDivRef.current])
useUpdatedEffect(() => { useEffect(() => {
const intervalId = setInterval(getCpuInfo(), parseInt(refreshInterval) * 1000) const intervalId = setInterval(getCpuInfo(), parseInt(refreshInterval) * 1000)
return () => { return () => {

View File

@@ -1,4 +1,3 @@
import { useUpdatedEffect } from '@/util/hooks'
import { r_sys_statistics_hardware } from '@/services/system' import { r_sys_statistics_hardware } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
import { CommonCard } from '@/pages/System/Statistics' import { CommonCard } from '@/pages/System/Statistics'
@@ -6,7 +5,7 @@ import { CommonCard } from '@/pages/System/Statistics'
const HardwareInfo = () => { const HardwareInfo = () => {
const [hardwareInfoData, setHardwareInfoData] = useState<HardwareInfoVo>() const [hardwareInfoData, setHardwareInfoData] = useState<HardwareInfoVo>()
useUpdatedEffect(() => { useEffect(() => {
void r_sys_statistics_hardware().then((res) => { void r_sys_statistics_hardware().then((res) => {
const response = res.data const response = res.data
if (response.success) { if (response.success) {

View File

@@ -1,6 +1,5 @@
import Icon from '@ant-design/icons' import Icon from '@ant-design/icons'
import * as echarts from 'echarts/core' import * as echarts from 'echarts/core'
import { useUpdatedEffect } from '@/util/hooks'
import { getTimesBetweenTwoTimes } from '@/util/datetime' import { getTimesBetweenTwoTimes } from '@/util/datetime'
import { r_sys_statistics_online } from '@/services/system' import { r_sys_statistics_online } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
@@ -14,7 +13,7 @@ const OnlineInfo = () => {
const [currentOnlineCount, setCurrentOnlineCount] = useState(-1) const [currentOnlineCount, setCurrentOnlineCount] = useState(-1)
const [scope, setScope] = useState('WEAK') const [scope, setScope] = useState('WEAK')
useUpdatedEffect(() => { useEffect(() => {
const chartResizeObserver = new ResizeObserver(() => { const chartResizeObserver = new ResizeObserver(() => {
onlineInfoEChartsRef.current?.resize() onlineInfoEChartsRef.current?.resize()
}) })
@@ -26,7 +25,7 @@ const OnlineInfo = () => {
} }
}, [isLoading]) }, [isLoading])
useUpdatedEffect(() => { useEffect(() => {
getOnlineInfo() getOnlineInfo()
}, []) }, [])

View File

@@ -1,4 +1,3 @@
import { useUpdatedEffect } from '@/util/hooks'
import { utcToLocalTime } from '@/util/datetime' import { utcToLocalTime } from '@/util/datetime'
import { r_sys_statistics_software } from '@/services/system' import { r_sys_statistics_software } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
@@ -7,7 +6,7 @@ import { CommonCard } from '@/pages/System/Statistics'
const SoftwareInfo = () => { const SoftwareInfo = () => {
const [softwareInfoData, setSoftwareInfoData] = useState<SoftwareInfoVo>() const [softwareInfoData, setSoftwareInfoData] = useState<SoftwareInfoVo>()
useUpdatedEffect(() => { useEffect(() => {
void r_sys_statistics_software().then((res) => { void r_sys_statistics_software().then((res) => {
const response = res.data const response = res.data
if (response.success) { if (response.success) {

View File

@@ -1,7 +1,6 @@
import * as echarts from 'echarts/core' import * as echarts from 'echarts/core'
import { BarSeriesOption } from 'echarts/charts' import { BarSeriesOption } from 'echarts/charts'
import { formatByteSize } from '@/util/common' import { formatByteSize } from '@/util/common'
import { useUpdatedEffect } from '@/util/hooks'
import { r_sys_statistics_storage } from '@/services/system' import { r_sys_statistics_storage } from '@/services/system'
import FlexBox from '@/components/common/FlexBox' import FlexBox from '@/components/common/FlexBox'
import { import {
@@ -25,7 +24,7 @@ const StorageInfo = () => {
tooltip: { valueFormatter: (value) => formatByteSize(value as number) } tooltip: { valueFormatter: (value) => formatByteSize(value as number) }
} }
useUpdatedEffect(() => { useEffect(() => {
const chartResizeObserver = new ResizeObserver(() => { const chartResizeObserver = new ResizeObserver(() => {
storageInfoEChartsRef.current.forEach((value) => value.resize()) storageInfoEChartsRef.current.forEach((value) => value.resize())
}) })
@@ -37,7 +36,7 @@ const StorageInfo = () => {
} }
}, [storageInfoDivRef.current]) }, [storageInfoDivRef.current])
useUpdatedEffect(() => { useEffect(() => {
const intervalId = setInterval(getStorageInfo(), parseInt(refreshInterval) * 1000) const intervalId = setInterval(getStorageInfo(), parseInt(refreshInterval) * 1000)
return () => { return () => {

View File

@@ -11,7 +11,6 @@ import {
DATABASE_SELECT_SUCCESS, DATABASE_SELECT_SUCCESS,
DATABASE_UPDATE_SUCCESS DATABASE_UPDATE_SUCCESS
} from '@/constants/common.constants' } from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { hasPermission } from '@/util/auth' import { hasPermission } from '@/util/auth'
import { utcToLocalTime, isPastTime, localTimeToUtc, dayjsToUtc, getNowUtc } from '@/util/datetime' import { utcToLocalTime, isPastTime, localTimeToUtc, dayjsToUtc, getNowUtc } from '@/util/datetime'
import { import {
@@ -748,7 +747,7 @@ const User = () => {
} }
}, [formValues]) }, [formValues])
useUpdatedEffect(() => { useEffect(() => {
getUser() getUser()
}, [ }, [
JSON.stringify(tableParams.filters), JSON.stringify(tableParams.filters),

View File

@@ -5,7 +5,7 @@ import FitFullscreen from '@/components/common/FitFullscreen'
import Sidebar from '@/components/common/Sidebar' import Sidebar from '@/components/common/Sidebar'
import FullscreenLoadingMask from '@/components/common/FullscreenLoadingMask' import FullscreenLoadingMask from '@/components/common/FullscreenLoadingMask'
const ToolsFramework = () => { const UserFramework = () => {
return ( return (
<> <>
<FitFullscreen data-component={'user-framework'} className={'flex-horizontal'}> <FitFullscreen data-component={'user-framework'} className={'flex-horizontal'}>
@@ -62,4 +62,4 @@ const ToolsFramework = () => {
) )
} }
export default ToolsFramework export default UserFramework