Refactor settings management and add mutation error handling
All checks were successful
Deploy to production / build (push) Successful in 18s
All checks were successful
Deploy to production / build (push) Successful in 18s
This commit is contained in:
@@ -37,7 +37,11 @@ export function Personalization() {
|
||||
const { isMobile, theme } = useCommonHooks();
|
||||
useEffect(() => {
|
||||
if (debounced && Object.keys(debounced).length) {
|
||||
void mutateAsync({ method: 'PATCH', endpoint: endpoint, body: debounced });
|
||||
mutateAsync({ method: 'PATCH', endpoint: endpoint, body: debounced }).catch(
|
||||
(error) => {
|
||||
console.error(error);
|
||||
},
|
||||
);
|
||||
setUpdate(undefined);
|
||||
}
|
||||
}, [debounced]);
|
||||
|
||||
Reference in New Issue
Block a user