diff --git a/src/app/insights/components/InsightsDisplay.tsx b/src/app/insights/components/InsightsDisplay.tsx
index e676547c..17f37382 100644
--- a/src/app/insights/components/InsightsDisplay.tsx
+++ b/src/app/insights/components/InsightsDisplay.tsx
@@ -180,7 +180,7 @@ export default function InsightsDisplay() {
}
className={clsx(
"font-normal",
- isActive && "bg-twd-primary-purple text-white"
+ isActive && "bg-twd-secondary-purple text-white"
)}
/>
);
diff --git a/src/app/moods/components/Cube.tsx b/src/app/moods/components/Cube.tsx
index 3b519195..966474d9 100644
--- a/src/app/moods/components/Cube.tsx
+++ b/src/app/moods/components/Cube.tsx
@@ -10,6 +10,7 @@ import quadrants from "./data/quadrants.json";
import labelsMood from "./data/labels_mood.json";
import labelsPriority from "./data/labels_priority.json";
import moodTooltips from "./data/mood_tooltips.json";
+import clsx from "clsx";
// Cube quadrants and labels order (in quadrants.json/labels.json):
// Bottom-front-left
@@ -90,36 +91,76 @@ export default function Cube({ neuroState }: CubeProps) {
/>
diff --git a/src/app/moods/components/MoodSlider.tsx b/src/app/moods/components/MoodSlider.tsx
index 7c833ac5..161cb55d 100644
--- a/src/app/moods/components/MoodSlider.tsx
+++ b/src/app/moods/components/MoodSlider.tsx
@@ -31,9 +31,12 @@ export default function MoodSlider({ chem, label, handleChange }: SliderProps) {
return (
diff --git a/src/app/needs/components/NeedsDisplay.tsx b/src/app/needs/components/NeedsDisplay.tsx
index d4ec1646..4423a008 100644
--- a/src/app/needs/components/NeedsDisplay.tsx
+++ b/src/app/needs/components/NeedsDisplay.tsx
@@ -84,9 +84,13 @@ export default function NeedsDisplay() {
const handleCloseNeedsModal = () => {
setNeedsModalOpen(false);
- setSelectedNeed(null);
setNeedsStep(1);
resetNeuros();
+
+ // This is so that the animation when closing NeedsModal doesn't look ugly
+ setTimeout(() => {
+ setSelectedNeed(null);
+ }, 100);
};
const handleCloseDeselectModal = () => {
@@ -268,16 +272,16 @@ export default function NeedsDisplay() {
useEffect(() => {
switch (needsStep) {
case 1:
- setPositiveLabel("urgent");
- setNegativeLabel("not urgent");
+ setPositiveLabel("Urgent");
+ setNegativeLabel("Not urgent");
break;
case 2:
setPositiveLabel("A lot of effort");
setNegativeLabel("A little effort");
break;
case 3:
- setPositiveLabel("worth doing");
- setNegativeLabel("not worth doing");
+ setPositiveLabel("Worth doing");
+ setNegativeLabel("Not worth doing");
break;
}
}, [needsStep]);
@@ -296,7 +300,7 @@ export default function NeedsDisplay() {
/>
))}
-
+
>
);
-}
\ No newline at end of file
+}
diff --git a/src/app/needs/components/NeedsModal.tsx b/src/app/needs/components/NeedsModal.tsx
index e42f500d..3ffc6434 100644
--- a/src/app/needs/components/NeedsModal.tsx
+++ b/src/app/needs/components/NeedsModal.tsx
@@ -7,9 +7,6 @@ interface NeedsModalProps {
modalOpen: boolean;
title?: string;
needsStep: number;
- urgent: number;
- effortful: number;
- worthDoing: number;
positiveLabel: string;
negativeLabel: string;
handlePositiveClick: () => void;
@@ -29,11 +26,17 @@ export default function NeedsModal({
handleBackClick,
handleCloseClick,
}: NeedsModalProps) {
- if (!modalOpen) return null;
-
return (
-
-
+
+
Step {needsStep} of 3
@@ -57,7 +60,11 @@ export default function NeedsModal({
-
+
{title}
diff --git a/src/ui/shared/Modal.tsx b/src/ui/shared/Modal.tsx
index beb59d8d..158ac77f 100644
--- a/src/ui/shared/Modal.tsx
+++ b/src/ui/shared/Modal.tsx
@@ -33,40 +33,46 @@ export default function Modal({
return (
<>
- {modalOpen && (
-
-
-
- {inputModal ? (
-
+
+
+ {inputModal ? (
+
+ ) : (
+
{title}
+ )}
+
+ {backButton && (
+
+ )}
+ {forwardButton && (
+
- ) : (
-
{title}
)}
-
- {backButton && (
-
- )}
- {forwardButton && (
-
- )}
-
- )}
+
>
);
}