mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
fix: delete app and setting modal is not wokring in firefox (#1427)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useContext, useContextSelector } from 'use-context-selector'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import cn from 'classnames'
|
||||
@@ -30,6 +30,7 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
|
||||
const { t } = useTranslation()
|
||||
const { notify } = useContext(ToastContext)
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
const { push } = useRouter()
|
||||
|
||||
const mutateApps = useContextSelector(
|
||||
AppsContext,
|
||||
@@ -103,11 +104,13 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
|
||||
|
||||
const Operations = (props: HtmlContentProps) => {
|
||||
const onClickSettings = async (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.stopPropagation()
|
||||
props.onClick?.()
|
||||
e.preventDefault()
|
||||
await getAppDetail()
|
||||
}
|
||||
const onClickDelete = async (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.stopPropagation()
|
||||
props.onClick?.()
|
||||
e.preventDefault()
|
||||
setShowConfirmDelete(true)
|
||||
@@ -133,8 +136,11 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Link
|
||||
href={`/app/${app.id}/overview`}
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
push(`/app/${app.id}/overview`)
|
||||
}}
|
||||
className={style.listItem}
|
||||
>
|
||||
<div className={style.listItemTitle}>
|
||||
@@ -186,7 +192,7 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
|
||||
onSave={onSaveSiteConfig}
|
||||
/>
|
||||
)}
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user