mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
M #~: Removes login error message when user is not logged in! (#3135)
This commit is contained in:
parent
262f435cdd
commit
6144699e2c
@ -30,7 +30,7 @@ import Sidebar from 'client/components/Sidebar'
|
||||
import { _APPS } from 'client/constants'
|
||||
import { useAuth, useViews } from 'client/features/Auth'
|
||||
import { useGeneralApi } from 'client/features/General'
|
||||
import { useCheckOfficialSupportQuery } from 'client/features/OneApi/support'
|
||||
import { useLazyCheckOfficialSupportQuery } from 'client/features/OneApi/support'
|
||||
import systemApi from 'client/features/OneApi/system'
|
||||
import { isDevelopment } from 'client/utils'
|
||||
|
||||
@ -53,7 +53,7 @@ const showSupportTab = (routes = [], find = true) => {
|
||||
* @returns {ReactElement} App rendered.
|
||||
*/
|
||||
const SunstoneApp = () => {
|
||||
const { isSuccess } = useCheckOfficialSupportQuery()
|
||||
const [getSupport, { isSuccess }] = useLazyCheckOfficialSupportQuery()
|
||||
const { changeAppTitle } = useGeneralApi()
|
||||
const { isLogged } = useAuth()
|
||||
const { views, view } = useViews()
|
||||
@ -61,6 +61,13 @@ const SunstoneApp = () => {
|
||||
useEffect(() => {
|
||||
changeAppTitle(APP_NAME)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if (view) {
|
||||
getSupport()
|
||||
}
|
||||
}, [view, getSupport])
|
||||
|
||||
const endpoints = useMemo(() => {
|
||||
const fixedEndpoints = [
|
||||
...ENDPOINTS,
|
||||
|
Loading…
Reference in New Issue
Block a user