Merge branch 'main' of github.com:Irev-Dev/cadhub into main
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react'
|
import { useState } from 'react'
|
||||||
import { Link, navigate, routes } from '@redwoodjs/router'
|
import { Link, routes } from '@redwoodjs/router'
|
||||||
import { useAuth } from '@redwoodjs/auth'
|
import { useAuth } from '@redwoodjs/auth'
|
||||||
import { Flash } from '@redwoodjs/web'
|
import { Flash } from '@redwoodjs/web'
|
||||||
import Tooltip from '@material-ui/core/Tooltip'
|
import Tooltip from '@material-ui/core/Tooltip'
|
||||||
@@ -24,6 +24,7 @@ import logo from 'src/layouts/MainLayout/Logo_2.jpg'
|
|||||||
const MainLayout = ({ children }) => {
|
const MainLayout = ({ children }) => {
|
||||||
const { logIn, logOut, isAuthenticated, currentUser } = useAuth()
|
const { logIn, logOut, isAuthenticated, currentUser } = useAuth()
|
||||||
const { data, loading } = useQuery(QUERY, {
|
const { data, loading } = useQuery(QUERY, {
|
||||||
|
skip: !currentUser?.sub,
|
||||||
variables: { id: currentUser?.sub },
|
variables: { id: currentUser?.sub },
|
||||||
})
|
})
|
||||||
const [isOpen, setIsOpen] = useState(false)
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user