0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

Merge pull request #1286 from logto-io/charles-log-3251-toast-message-on-save-uri-success-in-guide

fix(console): add toast message on save uri success in guide
This commit is contained in:
Charles Zhao 2022-06-29 11:11:28 +08:00 committed by GitHub
commit b75fea9258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ import { I18nKey } from '@logto/phrases';
import { Application } from '@logto/schemas';
import React, { useRef, KeyboardEvent } from 'react';
import { Controller, FormProvider, useForm } from 'react-hook-form';
import { toast } from 'react-hot-toast';
import { useTranslation } from 'react-i18next';
import useSWR from 'swr';
@ -50,6 +51,7 @@ const UriInputField = ({ appId, name, title, isSingle = false }: Props) => {
})
.json<Application>();
void mutate(updatedApp);
toast.success(t('general.saved'));
// Reset form to set 'isDirty' to false
reset(getValues());