Fix App logs page modal show different model icon. (#1224)

This commit is contained in:
Rhon Joe 2023-09-27 08:54:52 +08:00 • committed by GitHub
commit 8eae643911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 46 deletions

View file

@ -64,8 +64,8 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
const getAppDetail = async () => {
setDetailState({ loading: true })
const [err, res] = await asyncRunSafe<App>(
fetchAppDetail({ url: '/apps', id: app.id }) as Promise<App>,
const [err, res] = await asyncRunSafe(
fetchAppDetail({ url: '/apps', id: app.id }),
)
if (!err) {
setDetailState({ loading: false, detail: res })
@ -76,11 +76,11 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
const onSaveSiteConfig = useCallback(
async (params: ConfigParams) => {
const [err] = await asyncRunSafe<App>(
const [err] = await asyncRunSafe(
updateAppSiteConfig({
url: `/apps/${app.id}/site`,
body: params,
}) as Promise<App>,
}),
)
if (!err) {
notify({