From 129ce0b5681c4e8aea9d748ed95dbc679502699e Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Wed, 29 Jun 2022 10:26:04 +0800 Subject: [PATCH] fix(console): add toast message on save uri success in guide --- packages/console/src/mdx-components/UriInputField/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/console/src/mdx-components/UriInputField/index.tsx b/packages/console/src/mdx-components/UriInputField/index.tsx index 041f8929b..b93e22d60 100644 --- a/packages/console/src/mdx-components/UriInputField/index.tsx +++ b/packages/console/src/mdx-components/UriInputField/index.tsx @@ -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(); void mutate(updatedApp); + toast.success(t('general.saved')); // Reset form to set 'isDirty' to false reset(getValues());