Skip to content

Commit

Permalink
Merge pull request #393 from FalkorDB/fix-rerouting-from-settings
Browse files Browse the repository at this point in the history
Fix #392 fix rerouting from settings
  • Loading branch information
AviAvni authored Sep 9, 2024
2 parents 59e4606 + 1548cc8 commit d453d6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export default function Settings() {

const [current, setCurrent] = useState('DB')
const router = useRouter()
const {data: session} = useSession()
const { data: session } = useSession()

useEffect(() => {
if (session?.user.role !== "Admin") router.back()
if (session && session.user.role !== "Admin") router.back()
}, [router, session])

const getCurrentTab = () => {
Expand Down

0 comments on commit d453d6e

Please sign in to comment.