test: add initial test files and component stubs
This commit is contained in:
committed by
Loic Coenen (aider)
parent
5a6de57a91
commit
826069e8dd
15
src/containers/BerlinClock.tsx
Normal file
15
src/containers/BerlinClock.tsx
Normal 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;
|
||||
}
|
||||
13
src/containers/DigitalClock.tsx
Normal file
13
src/containers/DigitalClock.tsx
Normal 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;
|
||||
}
|
||||
10
src/containers/TimeConverter.tsx
Normal file
10
src/containers/TimeConverter.tsx
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user