aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-25 04:13:57 +0100
committerGravatar Joe Banks <[email protected]>2024-08-25 04:13:57 +0100
commitb036845dfbae60074f757ba2d7fb378b0ab754a1 (patch)
tree0482b28da920a38da3748bc9c6e24933111c3887
parentGracefully handle missing token errors (diff)
Only show colour picker if there is a choice
-rw-r--r--thallium-frontend/src/components/StoreItem.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/thallium-frontend/src/components/StoreItem.tsx b/thallium-frontend/src/components/StoreItem.tsx
index c0aeed1..a7bd52b 100644
--- a/thallium-frontend/src/components/StoreItem.tsx
+++ b/thallium-frontend/src/components/StoreItem.tsx
@@ -222,7 +222,7 @@ const StoreItem: React.FC<StoreItemProps> = ({ template }: StoreItemProps) => {
<h3>{template.title}</h3>
<img src={template.mockup_file_url} alt={template.title} />
- {colours === 1 && (
+ {(colours === 1 && uniqueColours.length > 1) && (
<div>
{uniqueColours.map((colour) => (
<ColourSwatch
@@ -263,9 +263,10 @@ const StoreItem: React.FC<StoreItemProps> = ({ template }: StoreItemProps) => {
))}
</SizeHolder>
- {selectedVariant && (
+ {selectedVariant ?
<p>${selectedVariant.price} USD</p>
- )}
+ : <p>Select a size to view price</p>
+ }
<CartButton
disabled={selectedVariant === null}