refactor(stackedComponents): change grid columns to 1 to improve layout
refactor(market-card): remove unnecessary blur effect and add opacity on hover to improve visual feedback refactor(market-card): add condition to prevent adding to cart while loading to prevent multiple requests
This commit is contained in:
parent
664c5c4ffb
commit
b0492f3adc
2 changed files with 6 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ interface ElementStackProps {
|
|||
const ElementStack: React.FC<ElementStackProps> = ({ children }) => {
|
||||
return (
|
||||
<div
|
||||
className={`grid grid-cols-3`}
|
||||
className={`grid grid-cols-1`}
|
||||
style={{ display: "grid", gridAutoFlow: "row" }}
|
||||
>
|
||||
{children.map((child, index) => (
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<Card className="group relative flex cursor-pointer flex-col justify-between overflow-hidden transition-all hover:shadow-md">
|
||||
<Card className="group relative flex flex-col justify-between overflow-hidden transition-all hover:shadow-md">
|
||||
<div>
|
||||
<CardHeader>
|
||||
{/*
|
||||
|
|
@ -166,7 +166,7 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
|||
</div>
|
||||
}
|
||||
>
|
||||
<div className="hover:blur-sm">
|
||||
<div className="pr-2 hover:opacity-40">
|
||||
{testTags.length > 0 ? (
|
||||
<ElementStack>
|
||||
{testTags.map((tag, index) => (
|
||||
|
|
@ -222,6 +222,9 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
|||
size="sm"
|
||||
className="whitespace-nowrap "
|
||||
onClick={() => {
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
if (!added) {
|
||||
handleAdd();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue