just an error catch
This commit is contained in:
parent
f342940283
commit
9324655a9e
1 changed files with 2 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ export default function UserSettings(props: Props) {
|
|||
const [sharing, setSharing] = useState(false)
|
||||
const userAPI = useUserAPI();
|
||||
const classes = useStyles()
|
||||
const { success } = useSnackbar();
|
||||
const { success, error } = useSnackbar();
|
||||
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [user, setUser] = useState<User>(globalState.user);
|
||||
|
|
@ -113,7 +113,7 @@ export default function UserSettings(props: Props) {
|
|||
setDistanceUnit(user.settings.distanceUnit);
|
||||
setGrainUnit(user.settings.grainUnit);
|
||||
})
|
||||
.catch((error: any) => {
|
||||
.catch(() => {
|
||||
error("Error occurred while updating your profile");
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue