Skip to content

Commit

Permalink
Adjust start the demo game completion
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdesque committed Oct 17, 2022
1 parent c2745ec commit f5f39e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/games/StartTheDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const StartTheDemo = () => {
textAlign="center"
flexWrap="wrap"
justifyContent="center"
maxWidth="lg"
mx="auto"
>
<Grid item sx={{ mt: 4 }}>
<Typography
Expand Down
8 changes: 7 additions & 1 deletion src/services/StartTheDemoSVG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import Popover from '@mui/material/Popover'
import { useState } from 'react'
import useStore from 'utils/store'
import { useHasHydrated } from 'utils/useHasHydrated'
import { completeMessage } from 'config/startthedemo'

export const StartTheDemoSVG = ({ viewBox }) => {
const { items } = useStore()
const { allCorrectItemsActivated, language, items } = useStore()
const hasHydrated = useHasHydrated()
const [description, setDescription] = useState('')

Expand Down Expand Up @@ -40,6 +41,11 @@ export const StartTheDemoSVG = ({ viewBox }) => {
}}
>
<Typography sx={{ p: 2 }}>{description}</Typography>
{hasHydrated && allCorrectItemsActivated() && (
<Typography sx={{ p: 2 }}>
{completeMessage[language]}
</Typography>
)}
</Popover>
)}
<style>{`
Expand Down

0 comments on commit f5f39e1

Please sign in to comment.