Skip to content
Snippets Groups Projects
Commit 31030503 authored by Yoan VALLET's avatar Yoan VALLET
Browse files
parents a7d25782 e0b066a6
No related branches found
No related tags found
1 merge request!15Merge Dev to Master
......@@ -16,6 +16,7 @@ const WelcomeModalContainer: React.FC<WelcomeModalContainerProps> = ({
client,
}: WelcomeModalContainerProps) => {
const [modalOpen, setModalOpen] = useState<boolean>(false)
const [modalExist, setModalExist] = useState<boolean>(false)
const { data: instanceSettings } = useInstanceSettings(client)
async function updateWelcomeModalState() {
......@@ -42,13 +43,19 @@ const WelcomeModalContainer: React.FC<WelcomeModalContainerProps> = ({
.then(async ({ data }) => {
const welcomeModalState = data[0].haveSeenWelcomeModal
if (!welcomeModalState) {
setModalOpen(true)
setModalExist(true)
}
})
}
getWelcomeModalState()
}, [])
useEffect(() => {
if (modalExist) {
setModalOpen(true)
}
}, [modalExist])
return (
<React.Fragment>
<Modal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment