Search bar fixes and performance updates
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { ActionIcon, Divider, Group, ScrollArea, Stack, Tabs, Text } from '@mantine/core';
|
||||
import { useCommonHooks, useQueryAPI } from 'hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { FaPaintBrush, FaRegListAlt } from 'react-icons/fa';
|
||||
import {
|
||||
FiArrowLeftCircle,
|
||||
@@ -27,19 +26,14 @@ import WolClients from './components/WoL/WolClients';
|
||||
|
||||
export function Settings() {
|
||||
const endpoint = 'api/personalData';
|
||||
const { data: personalData, isFetched: personalDataIsFetched } = useQueryAPI({
|
||||
const { data: personalData } = useQueryAPI({
|
||||
endpoint: endpoint,
|
||||
});
|
||||
const [personal, setPersonal] = useState<PersonalData>();
|
||||
const personal: PersonalData = personalData?.[0];
|
||||
const { isMobile, theme } = useCommonHooks();
|
||||
const navigate = useNavigate();
|
||||
const { tabValue } = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
if (personalData && personalDataIsFetched) {
|
||||
setPersonal(personalData[0]);
|
||||
}
|
||||
}, [personalData, personalDataIsFetched]);
|
||||
return (
|
||||
<Stack h={'100%'} gap={0}>
|
||||
<Group gap={0} style={{ position: 'relative', paddingBottom: '1rem' }}>
|
||||
|
||||
Reference in New Issue
Block a user