test: add initial test files and component stubs

This commit is contained in:
Loic Coenen
2026-06-23 16:04:30 +02:00
committed by Loic Coenen (aider)
parent 5a6de57a91
commit 826069e8dd
16 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { useState } from 'react';
import { LampLine } from '../components/LampLine';
import { useCurrentTime } from '../hooks/useCurrentTime';
import { dateToBerlin } from '../utils';
interface BerlinClockProps {
enabled: boolean;
}
export function BerlinClock({ enabled }: BerlinClockProps) {
const { currentTime } = useCurrentTime();
const berlin = dateToBerlin(currentTime);
// Will render four LampLine components
return null;
}

View File

@@ -0,0 +1,13 @@
import { useState } from 'react';
import { useCurrentTime } from '../hooks/useCurrentTime';
import { dateToDigital } from '../utils';
interface DigitalClockProps {
enabled: boolean;
}
export function DigitalClock({ enabled }: DigitalClockProps) {
const { currentTime } = useCurrentTime();
const digital = dateToDigital(currentTime);
return null;
}

View File

@@ -0,0 +1,10 @@
import { useState } from 'react';
import { BerlinClock } from './BerlinClock';
import { DigitalClock } from './DigitalClock';
import { useCurrentTime } from '../hooks/useCurrentTime';
export function TimeConverter() {
const [useSystemTime, setUseSystemTime] = useState(false);
// When useSystemTime is true, both BerlinClock and DigitalClock are disabled.
return null;
}