1
0
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:
Jorge Miguel Lobo Escalona 2024-07-02 17:25:27 +02:00 committed by GitHub
parent 262f435cdd
commit 6144699e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,