diff --git a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx index 57701ac6..e997d247 100644 --- a/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx +++ b/src/app/(main)/websites/[websiteId]/settings/SharesTable.tsx @@ -1,13 +1,14 @@ import { DataColumn, DataTable, type DataTableProps, Row } from '@umami/react-zen'; import { DateDistance } from '@/components/common/DateDistance'; import { ExternalLink } from '@/components/common/ExternalLink'; -import { useConfig, useMessages } from '@/components/hooks'; +import { useConfig, useMessages, useMobile } from '@/components/hooks'; import { ShareDeleteButton } from './ShareDeleteButton'; import { ShareEditButton } from './ShareEditButton'; export function SharesTable(props: DataTableProps) { const { formatMessage, labels } = useMessages(); const { cloudMode } = useConfig(); + const { isMobile } = useMobile(); const getUrl = (slug: string) => { return `${cloudMode ? process.env.cloudUrl : window?.location.origin}${process.env.basePath || ''}/share/${slug}`; @@ -18,7 +19,7 @@ export function SharesTable(props: DataTableProps) { {({ name }: any) => name} - + {({ slug }: any) => { const url = getUrl(slug); return ( @@ -28,9 +29,11 @@ export function SharesTable(props: DataTableProps) { ); }} - - {(row: any) => } - + {!isMobile && ( + + {(row: any) => } + + )} {({ id, slug }: any) => { return ( diff --git a/src/app/(main)/websites/[websiteId]/settings/WebsiteShareForm.tsx b/src/app/(main)/websites/[websiteId]/settings/WebsiteShareForm.tsx index 8472ca97..49721f1e 100644 --- a/src/app/(main)/websites/[websiteId]/settings/WebsiteShareForm.tsx +++ b/src/app/(main)/websites/[websiteId]/settings/WebsiteShareForm.tsx @@ -11,7 +11,7 @@ export interface WebsiteShareFormProps { export function WebsiteShareForm({ websiteId }: WebsiteShareFormProps) { const { formatMessage, labels, messages } = useMessages(); - const { data, isLoading } = useWebsiteSharesQuery({ websiteId }); + const { data } = useWebsiteSharesQuery({ websiteId }); const shares = data?.data || []; const hasShares = shares.length > 0;