From 1d8bcdd626b6942430f779a357d2d7bf32a3aa6d Mon Sep 17 00:00:00 2001 From: AG Date: Fri, 19 Dec 2025 09:46:04 +0200 Subject: [PATCH] Top bar for Quick Log --- src/components/Tracker/SporadicView.tsx | 23 +++++++++++------------ src/components/ui/TopBar.tsx | 14 ++++++++++---- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/components/Tracker/SporadicView.tsx b/src/components/Tracker/SporadicView.tsx index 33e81bc..ef632bf 100644 --- a/src/components/Tracker/SporadicView.tsx +++ b/src/components/Tracker/SporadicView.tsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import { CheckCircle, Plus, Pencil, Trash2, X, Save } from 'lucide-react'; +import { TopBar } from '../ui/TopBar'; import { Language, WorkoutSet } from '../../types'; import { t } from '../../services/i18n'; import ExerciseModal from '../ExerciseModal'; @@ -76,8 +77,14 @@ const SporadicView: React.FC = ({ tracker, lang }) => { return (
-
-
+ + + {t('quick_log', lang)} + + } + actions={ -
-
-

- - {t('quick_log', lang)} -

-
-
- -
+ } + />
= ({ title, icon: Icon, actions }) => { +export const TopBar: React.FC = ({ title, icon: Icon, actions, leading }) => { return (
- {Icon && ( + {leading} + {!leading && Icon && (
)} -

{title}

+ {typeof title === 'string' ? ( +

{title}

+ ) : ( +
{title}
+ )} {actions &&
{actions}
}
);