Skip to content

Commit

Permalink
Fix: tag & settings modal in dataset card in Firefox (#6953)
Browse files Browse the repository at this point in the history
  • Loading branch information
JzoNgKVO authored Aug 5, 2024
1 parent f656e1b commit 2288efb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions web/app/(commonLayout)/datasets/DatasetCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useContext } from 'use-context-selector'
import Link from 'next/link'
import { useRouter } from 'next/navigation'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
Expand Down Expand Up @@ -33,6 +33,8 @@ const DatasetCard = ({
}: DatasetCardProps) => {
const { t } = useTranslation()
const { notify } = useContext(ToastContext)
const { push } = useRouter()

const { isCurrentWorkspaceDatasetOperator } = useAppContext()
const [tags, setTags] = useState<Tag[]>(dataset.tags)

Expand Down Expand Up @@ -107,10 +109,13 @@ const DatasetCard = ({

return (
<>
<Link
href={`/datasets/${dataset.id}/documents`}
className='group flex col-span-1 bg-white border-2 border-solid border-transparent rounded-xl shadow-sm min-h-[160px] flex flex-col transition-all duration-200 ease-in-out cursor-pointer hover:shadow-lg'
<div
className='group col-span-1 bg-white border-2 border-solid border-transparent rounded-xl shadow-sm min-h-[160px] flex flex-col transition-all duration-200 ease-in-out cursor-pointer hover:shadow-lg'
data-disable-nprogress={true}
onClick={(e) => {
e.preventDefault()
push(`/datasets/${dataset.id}/documents`)
}}
>
<div className='flex pt-[14px] px-[14px] pb-3 h-[66px] items-center gap-3 grow-0 shrink-0'>
<div className={cn(
Expand Down Expand Up @@ -200,7 +205,7 @@ const DatasetCard = ({
/>
</div>
</div>
</Link>
</div>
{showRenameModal && (
<RenameDatasetModal
show={showRenameModal}
Expand Down

0 comments on commit 2288efb

Please sign in to comment.