update link
This commit is contained in:
@@ -2,6 +2,7 @@ import { toast } from "@/components/Toast";
|
||||
import TrashWithConfrim from "@/components/TrashWithConfrim";
|
||||
import { Paths } from "@/config/Paths";
|
||||
import { extractErrorMessage } from "@/helpers/utils";
|
||||
import { useGetBusiness } from "@/pages/business/hooks/useBusinessData";
|
||||
import { useDleteCatalog } from "@/pages/catalogue/hooks/useCatalogueData";
|
||||
import { requestViewerFullscreen } from "@/pages/viewer/utils/viewerFullscreen";
|
||||
import { Edit, Eye, Share } from "iconsax-react";
|
||||
@@ -17,9 +18,10 @@ type Props = {
|
||||
};
|
||||
|
||||
const CatalogueItem: FC<Props> = ({ item, refetch }) => {
|
||||
const { data: business } = useGetBusiness();
|
||||
const deleteCatalog = useDleteCatalog();
|
||||
|
||||
const shareUrl = `${window.location.origin}${Paths.viewer}/${item.id}`;
|
||||
const shareUrl = `${window.location.origin}${Paths.viewerBySlug}/${business?.data?.slug}/${item.slug}`;
|
||||
|
||||
const handleShare = async () => {
|
||||
try {
|
||||
@@ -68,7 +70,7 @@ const CatalogueItem: FC<Props> = ({ item, refetch }) => {
|
||||
</div>
|
||||
<div className="flex justify-end gap-1 items-center mt-1">
|
||||
<Link
|
||||
to={Paths.viewerBySlug + `/${item.slug}`}
|
||||
to={Paths.viewerBySlug + `/${business?.data?.slug}/${item.slug}`}
|
||||
onClick={requestViewerFullscreen}
|
||||
>
|
||||
<div className="size-6 bg-[#EAECF4] rounded-md flex justify-center items-center">
|
||||
|
||||
Reference in New Issue
Block a user