Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions src/components/ArchiveView.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, useCallback, useMemo } from "react";
import { ProgressBar } from "./ProgressBar";
import {
ArrowRight,
Calendar,
Expand Down Expand Up @@ -364,14 +365,7 @@ export const ArchiveView = ({
className="w-full accent-accent-color"
/>
) : (
<div className="h-1 bg-white/5 rounded-full overflow-hidden">
<div
className="h-full accent-bg"
style={{
width: `${(log.focusDepth / 10) * 100}%`,
}}
></div>
</div>
<ProgressBar value={log.focusDepth} colorClass="accent-bg" />
)}
<div className="flex items-center justify-between text-[10px] font-bold">
<span>SESSION VALUE</span>
Expand All @@ -397,14 +391,7 @@ export const ArchiveView = ({
className="w-full accent-accent-color"
/>
) : (
<div className="h-1 bg-white/5 rounded-full overflow-hidden">
<div
className="h-full bg-blue-400"
style={{
width: `${(log.utility / 10) * 100}%`,
}}
></div>
</div>
<ProgressBar value={log.utility} colorClass="bg-blue-400" />
)}
<div className="flex items-center justify-between text-[10px] font-bold">
<span>MENTAL ENERGY</span>
Expand All @@ -430,14 +417,7 @@ export const ArchiveView = ({
className="w-full accent-accent-color"
/>
) : (
<div className="h-1 bg-white/5 rounded-full overflow-hidden">
<div
className="h-full bg-yellow-400"
style={{
width: `${(log.energyLevel / 10) * 100}%`,
}}
></div>
</div>
<ProgressBar value={log.energyLevel} colorClass="bg-yellow-400" />
)}
</div>
</div>
Expand Down
14 changes: 14 additions & 0 deletions src/components/ProgressBar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";

export const ProgressBar = ({ value, colorClass }) => {
return (
<div className="h-1 bg-white/5 rounded-full overflow-hidden">
<div
className={`h-full ${colorClass}`}
style={{
width: `${(value / 10) * 100}%`,
}}
></div>
</div>
);
};