feat: add Einführung button to annotation top bar that navigates back to the intro screen

This commit is contained in:
smaubio
2026-04-10 10:13:57 +02:00
parent 80d638024b
commit dcdcf6584c
2 changed files with 14 additions and 3 deletions

View File

@@ -24,12 +24,14 @@ interface AnnotationPageViewProps {
entries: DatasetEntryForAnnotation[];
experimentId: number;
viewType: string;
onShowIntro?: () => void;
}
export default function AnnotationPageView({
entries,
export default function AnnotationPageView({
entries,
experimentId,
viewType,
onShowIntro,
}: AnnotationPageViewProps) {
const [isPending, startTransition] = useTransition();
@@ -287,6 +289,15 @@ export default function AnnotationPageView({
</svg>
</button>
{onShowIntro && (
<button
onClick={onShowIntro}
className="text-sm px-3 py-1.5 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-md transition-colors"
>
Einführung
</button>
)}
{Object.keys(dialectScores).length > 0 && (
<button
onClick={() => setIsCalibrationModalOpen(true)}

View File

@@ -29,5 +29,5 @@ export default function AnnotationPhase({
);
}
return <AnnotationPageView entries={entries} experimentId={experimentId} viewType={viewType} />;
return <AnnotationPageView entries={entries} experimentId={experimentId} viewType={viewType} onShowIntro={() => setShowInfoPage(true)} />;
}