Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix collection product url #5385

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/proud-bulldogs-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Now product links on the collection points to the correct url.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChannelsAvailabilityDropdown } from "@dashboard/components/ChannelsAvailabilityDropdown";
import { GridTable } from "@dashboard/components/GridTable";
import Link from "@dashboard/components/Link";
import Drag from "@dashboard/icons/Drag";
import { productUrl } from "@dashboard/products/urls";
import { useSortable } from "@dnd-kit/sortable";
Expand Down Expand Up @@ -70,38 +71,34 @@ export const ProductTableItem = ({
</Box>
</GridTable.Cell>
<GridTable.Cell __height="inherit" padding={0}>
<Box
as="a"
href={href}
padding={2}
display="flex"
alignItems="center"
gap={2}
height="100%"
>
{product?.thumbnail ? (
<Box borderColor="default1" borderWidth={1} borderRadius={2} borderStyle="solid">
<Box
as="img"
src={product?.thumbnail?.url}
alt={product?.name}
__width="31px"
__height="31px"
/>
</Box>
) : (
<EmptyImage />
)}
<Text>{product?.name}</Text>
</Box>
<Link href={href}>
<Box padding={2} display="flex" alignItems="center" gap={2} height="100%">
{product?.thumbnail ? (
<Box borderColor="default1" borderWidth={1} borderRadius={2} borderStyle="solid">
<Box
as="img"
src={product?.thumbnail?.url}
alt={product?.name}
__width="31px"
__height="31px"
/>
</Box>
) : (
<EmptyImage />
)}
<Text>{product?.name}</Text>
</Box>
</Link>
</GridTable.Cell>
<GridTable.Cell __height="inherit" padding={0}>
<Box as="a" href={href} padding={2} display="flex" alignItems="center" height="100%">
<Text>{product?.productType.name || <Skeleton />}</Text>
</Box>
<Link href={href}>
<Box padding={2} display="flex" alignItems="center" height="100%">
<Text>{product?.productType.name || <Skeleton />}</Text>
</Box>
</Link>
</GridTable.Cell>
<GridTable.Cell __height="inherit" padding={0}>
<Box as="a" display="block" height="100%" padding={2}>
<Box display="block" height="100%" padding={2}>
{product && !product?.channelListings?.length ? (
"-"
) : product?.channelListings !== undefined ? (
Expand Down
Loading