mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Fix issues with basePath.
This commit is contained in:
parent
1e8c1d0d18
commit
339cd21596
15 changed files with 66 additions and 51 deletions
|
|
@ -2,17 +2,7 @@ import { useState, useEffect } from 'react';
|
|||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { updateUser } from 'redux/actions/user';
|
||||
import { useRouter } from 'next/router';
|
||||
import { get } from '../lib/web';
|
||||
|
||||
export async function fetchUser() {
|
||||
const res = await fetch('/api/auth/verify');
|
||||
|
||||
if (!res.ok) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return await res.json();
|
||||
}
|
||||
import { get } from 'lib/web';
|
||||
|
||||
export default function useRequireLogin() {
|
||||
const router = useRouter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue