Initial React project

This commit is contained in:
Johan
2026-03-04 22:23:10 +01:00
parent 689c6e9e15
commit 01363820e2
13 changed files with 1550 additions and 84 deletions

View File

@@ -30,6 +30,7 @@ import './simulator.css';
interface SimulatorPageProps {
onLogout: () => void;
onNavigate: (target: DashboardNavKey) => void;
onOpenEvaluation: (selection: SimulatorEvaluationSelection) => void;
onToggleTheme: () => void;
theme: 'light' | 'dark';
}
@@ -44,6 +45,13 @@ interface InterviewCard {
dateLabel: string;
}
export interface SimulatorEvaluationSelection {
interviewId: string;
title: string;
companyName: string;
dateLabel: string;
}
const FALLBACK_INTERVIEWS: InterviewCard[] = [
{
id: 'sim-1',
@@ -99,7 +107,7 @@ function jobLabel(job: JobsListItem): string {
return `${job.title || 'Stilling'}${job.companyName ? ` · ${job.companyName}` : ''}`;
}
export function SimulatorPage({ onLogout, onNavigate, onToggleTheme, theme }: SimulatorPageProps) {
export function SimulatorPage({ onLogout, onNavigate, onOpenEvaluation, onToggleTheme, theme }: SimulatorPageProps) {
const viewModel = useMemo(() => new SimulatorViewModel(), []);
const [name, setName] = useState('Lasse');
@@ -443,7 +451,18 @@ export function SimulatorPage({ onLogout, onNavigate, onToggleTheme, theme }: Si
<div className="sim-card-foot">
<small>{item.dateLabel}</small>
{item.completed ? (
<button type="button" className="sim-link-btn">Se evaluering <ArrowRight size={14} strokeWidth={1.8} /></button>
<button
type="button"
className="sim-link-btn"
onClick={() => onOpenEvaluation({
interviewId: item.id,
title: item.title,
companyName: item.companyName,
dateLabel: item.dateLabel,
})}
>
Se evaluering <ArrowRight size={14} strokeWidth={1.8} />
</button>
) : (
<button type="button" className="sim-link-btn">Fortsæt <Play size={14} strokeWidth={1.8} /></button>
)}