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 }) => {
|
const ElementStack: React.FC<ElementStackProps> = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`grid grid-cols-3`}
|
className={`grid grid-cols-1`}
|
||||||
style={{ display: "grid", gridAutoFlow: "row" }}
|
style={{ display: "grid", gridAutoFlow: "row" }}
|
||||||
>
|
>
|
||||||
{children.map((child, index) => (
|
{children.map((child, index) => (
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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>
|
<div>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
{/*
|
{/*
|
||||||
|
|
@ -166,7 +166,7 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="hover:blur-sm">
|
<div className="pr-2 hover:opacity-40">
|
||||||
{testTags.length > 0 ? (
|
{testTags.length > 0 ? (
|
||||||
<ElementStack>
|
<ElementStack>
|
||||||
{testTags.map((tag, index) => (
|
{testTags.map((tag, index) => (
|
||||||
|
|
@ -222,6 +222,9 @@ export const MarketCardComponent = ({ data }: { data: storeComponent }) => {
|
||||||
size="sm"
|
size="sm"
|
||||||
className="whitespace-nowrap "
|
className="whitespace-nowrap "
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!added) {
|
if (!added) {
|
||||||
handleAdd();
|
handleAdd();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue