Skip to content

Commit

Permalink
Merge pull request #113 from fac30/last-touches-2
Browse files Browse the repository at this point in the history
fix: delete dummy data
  • Loading branch information
jackcasstlesjones authored Dec 19, 2024
2 parents de00eb0 + 287c7b6 commit c82816f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
4 changes: 0 additions & 4 deletions src/app/insights/components/BarGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@


interface BarGraphProps {
data: { name: string; value: number }[];
}




export default function BarGraph({ data }: BarGraphProps) {
return (
<div className="bg-twd-graph-background mt-10 w-11/12 m-auto rounded-lg">
Expand Down
24 changes: 11 additions & 13 deletions src/app/insights/components/InsightsDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ export default function InsightsDisplay() {
getNeedsData();
}, []);

const dummyNeedsData = [
{ name: "Integrity", value: 8 },
{ name: "Celebration", value: 35 },
{ name: "Physical Nurturance", value: 12 },
{ name: "Autonomy", value: 10 },
{ name: "Harmony", value: 71 },
{ name: "Play", value: 54 },
{ name: "Interdependence", value: 15 },
];
// const dummyNeedsData = [
// { name: "Integrity", value: 8 },
// { name: "Celebration", value: 35 },
// { name: "Physical Nurturance", value: 12 },
// { name: "Autonomy", value: 10 },
// { name: "Harmony", value: 71 },
// { name: "Play", value: 54 },
// { name: "Interdependence", value: 15 },
// ];

return (
<>
Expand Down Expand Up @@ -241,11 +241,9 @@ export default function InsightsDisplay() {
<div className="flex h-40 w-full justify-center items-center">
<p className="text-xl">Loading Bar Chart...</p>
</div>
) : needsData.some((item) => item.value > 0) ? (
) :
<BarGraph data={needsData} />
) : (
<BarGraph data={dummyNeedsData} />
)}
}
</>
);
}

0 comments on commit c82816f

Please sign in to comment.