Commit 0ac228d4 authored by v.mattfeld's avatar v.mattfeld
Browse files

add uid to done page

parent 46969ddc
......@@ -40,7 +40,7 @@ const Form: FC<FormProps> = ({ pageNumber, uid, imageID, refetch, isCheck }) =>
useEffect(() => {
if (pageNumber > STUDY_SIZE)
// redirect to done after STUDY_SIZE submits
router.push('/done')
router.push(`/done?uid=${uid}`)
}, [pageNumber, router])
useCallback(() => {
......
......@@ -158,19 +158,18 @@ const Annotate = ({
<Flex w="full" alignItems="center" justifyContent="center">
<Box
bg={colorMode}
w="lg"
maxW="xl"
w="2xl"
maxW="2xl"
borderWidth="1px"
rounded="lg"
shadow="lg"
shadow="md"
mt={5}
position="relative"
px={"14"}
>
<Center p={5}>
<Stack spacing={3}>
<Stack spacing={"5"}>
<Heading textAlign='center' color='red.400'>{(nextIndex as number) - 1} / {STUDY_SIZE}</Heading>
<Spacer />
<Spacer />
<Image
boxShadow="md"
borderRadius="md"
......@@ -180,7 +179,7 @@ const Annotate = ({
</Stack>
</Center>
<Form
uid={id as string}
uid={userId.uid}
imageID={isCheck() ? check!.imageID : images[nextIndex - 1].id}
pageNumber={nextIndex as number}
refetch={mutate}
......
import React from 'react'
import { useTranslation } from 'react-i18next'
import { Heading, Center, Text } from "@chakra-ui/react";
import { Heading, Center, Text, Stack, Spacer } from "@chakra-ui/react";
import PrimaryButton from '../components/PrimaryButton'
import { useRecoilValue } from 'recoil';
import { userState } from './annotate';
const Done = () => {
const { t } = useTranslation()
const { uid } = useRecoilValue(userState)
return (
<Center>
<Heading
lineHeight={1.1}
fontWeight={600}
fontSize={{ base: '3xl', sm: '4xl', lg: '6xl' }}>
<Text
as={'span'}
position={'relative'}
_after={{
content: "''",
width: 'full',
height: '30%',
position: 'absolute',
bottom: 1,
left: 0,
bg: 'red.400',
zIndex: -1,
}}>
{t("done")}
</Text>
<br />
<Text as={'span'} >
{t('thanks')}
</Text>
</Heading>
<Stack spacing={'20'}>
<Heading
lineHeight={1.1}
fontWeight={600}
fontSize={{ base: '3xl', sm: '4xl', lg: '6xl' }}>
<Text
as={'span'}
position={'relative'}
_after={{
content: "''",
width: 'full',
height: '30%',
position: 'absolute',
bottom: 1,
left: 0,
bg: 'red.400',
zIndex: -1,
}}>
{t("done")}
</Text>
<br />
<Text as={'span'} >
{t('thanks')}
</Text>
</Heading>
<Spacer />
{/* TODO: Translate */}
<Text fontSize='2xl'>Please copy your user ID <strong>(UID)</strong> below to continue on Limesurvey.</Text>
<pre>{JSON.stringify(uid, null, 2)}</pre>
<Spacer />
<PrimaryButton size='lg'>Continue on Limesurvey</PrimaryButton>
</Stack>
</Center>
)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment