mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Move auth token logic to useApi hook.
This commit is contained in:
parent
d552a01701
commit
be98500e82
2 changed files with 7 additions and 7 deletions
|
|
@ -36,7 +36,7 @@ export default function WebsiteSettings() {
|
|||
const [showUrl, setShowUrl] = useState();
|
||||
const [saved, setSaved] = useState(0);
|
||||
const [message, setMessage] = useState();
|
||||
const { data } = useFetch(`/websites` + (user?.is_admin ? '?include_all=true' : ''), {}, [saved]);
|
||||
const { data } = useFetch('/websites', { params: { include_all: !!user?.is_admin } }, [saved]);
|
||||
|
||||
const Buttons = row => (
|
||||
<ButtonLayout align="right">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue