2025-04-08 19:04:33 +00:00
|
|
|
import React from 'react';
|
2024-10-13 11:29:36 +00:00
|
|
|
import { Text, View } from '@/components/shared/Themed';
|
|
|
|
|
import styled from '@emotion/native';
|
2025-04-08 19:04:33 +00:00
|
|
|
import { useRouter } from 'expo-router';
|
2024-10-13 11:29:36 +00:00
|
|
|
|
|
|
|
|
import Button from '@/components/shared/Button';
|
|
|
|
|
import { HorizontalSpacer, VerticalSpacer } from '@/components/shared/Spacers';
|
2024-10-13 22:20:52 +00:00
|
|
|
import { i18n } from '@/app/i18n/i18n';
|
2024-10-13 11:29:36 +00:00
|
|
|
|
|
|
|
|
type FinishContentProps = {
|
|
|
|
|
handleStart: () => void;
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-13 22:20:52 +00:00
|
|
|
const t = i18n.scoped('timer.finishContent');
|
|
|
|
|
|
2024-10-13 11:29:36 +00:00
|
|
|
export default function FinishContent({
|
|
|
|
|
handleStart
|
|
|
|
|
}: FinishContentProps) {
|
2025-04-08 19:04:33 +00:00
|
|
|
const router = useRouter();
|
2024-10-13 11:29:36 +00:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
2024-10-13 22:20:52 +00:00
|
|
|
<Time>{t('finish')}</Time>
|
2024-10-13 11:29:36 +00:00
|
|
|
|
|
|
|
|
<VerticalSpacer heightUnits={8} />
|
|
|
|
|
|
|
|
|
|
<Row>
|
2024-10-13 22:20:52 +00:00
|
|
|
<Button label={t('restart')} onPress={handleStart} />
|
2024-10-13 11:29:36 +00:00
|
|
|
|
|
|
|
|
<HorizontalSpacer widthUnits={3} />
|
|
|
|
|
|
2025-04-08 19:04:33 +00:00
|
|
|
<Button label={i18n.t('back')} onPress={() => router.push('/')} />
|
2024-10-13 11:29:36 +00:00
|
|
|
</Row>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Row = styled(View)(() => ({
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
backgroundColor: 'black'
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
const Time = styled(Text)(({ theme }) => ({
|
2024-10-13 22:20:52 +00:00
|
|
|
fontSize: 70,
|
2024-10-13 11:29:36 +00:00
|
|
|
fontWeight: 'bold',
|
|
|
|
|
color: theme.colors.white
|
|
|
|
|
}));
|