mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): hide error toast for non-existed application in audit logs (#6168)
* fix(console): hide error toast for non-existed application in audit logs * chore: add changeset
This commit is contained in:
parent
c7010bbaaa
commit
06ef19905b
2 changed files with 6 additions and 1 deletions
5
.changeset/good-shrimps-cover.md
Normal file
5
.changeset/good-shrimps-cover.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@logto/console": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix a regression bug that error toasts pop up in audit log when logs are associated with deleted applications
|
|
@ -20,7 +20,7 @@ type Props = {
|
||||||
function ApplicationName({ applicationId, isLink = false }: Props) {
|
function ApplicationName({ applicationId, isLink = false }: Props) {
|
||||||
const isAdminConsole = applicationId === adminConsoleApplicationId;
|
const isAdminConsole = applicationId === adminConsoleApplicationId;
|
||||||
|
|
||||||
const fetchApi = useApi({ hideErrorToast: ['entity.not_found'] });
|
const fetchApi = useApi({ hideErrorToast: ['entity.not_exists_with_id'] });
|
||||||
const fetcher = useSwrFetcher<Application>(fetchApi);
|
const fetcher = useSwrFetcher<Application>(fetchApi);
|
||||||
const { data, error } = useSWR<Application, RequestError>(
|
const { data, error } = useSWR<Application, RequestError>(
|
||||||
!isAdminConsole && `api/applications/${applicationId}`,
|
!isAdminConsole && `api/applications/${applicationId}`,
|
||||||
|
|
Loading…
Reference in a new issue