@@ -2,14 +2,15 @@ import { Transition } from '@headlessui/react';
2
2
import React , { useCallback , useEffect } from 'react' ;
3
3
4
4
import Icon from '👨💻components/Icon' ;
5
+ import ChangePassword from '👨💻modals/ChangePassword' ;
6
+ import CreateLesson from '👨💻modals/CreateLesson' ;
7
+ import Login from '👨💻modals/Login' ;
8
+ import Register from '👨💻modals/Register' ;
5
9
import RegisterAfterPreview from '👨💻modals/RegisterAfterPreview' ;
6
10
import ResetPasswordSent from '👨💻modals/ResetPasswordSent' ;
7
11
8
12
import { InitialModalState , modalVar } from '../apollo/cache/modal' ;
9
13
import { useModalQuery } from '../generated/graphql' ;
10
- import CreateLesson from './CreateLesson' ;
11
- import Login from './Login' ;
12
- import Register from './Register' ;
13
14
14
15
const Modals : React . FC < Props > = ( ) => {
15
16
const { data } = useModalQuery ( ) ;
@@ -79,7 +80,7 @@ const Modals: React.FC<Props> = () => {
79
80
role = "dialog"
80
81
>
81
82
< div
82
- className = "absolute -top-3 -right-3 flex items-center justify-center bg-bg-nav-offset w-10 h-10 rounded-full"
83
+ className = "absolute -top-3 -right-3 flex items-center justify-center bg-bg-primary w-10 h-10 rounded-full"
83
84
onClick = { ( ) => modalVar ( InitialModalState ) }
84
85
>
85
86
< Icon
@@ -88,12 +89,11 @@ const Modals: React.FC<Props> = () => {
88
89
/>
89
90
</ div >
90
91
{ /* eslint-disable */ }
92
+ { data ?. modal ?. name === 'changePassword' && < ChangePassword /> }
91
93
{ data ?. modal ?. name === 'createLesson' && < CreateLesson /> }
92
94
{ data ?. modal ?. name === 'login' && < Login /> }
93
95
{ data ?. modal ?. name === 'register' && < Register /> }
94
- { data ?. modal ?. name === 'registerAfterPreview' && (
95
- < RegisterAfterPreview />
96
- ) }
96
+ { data ?. modal ?. name === 'registerAfterPreview' && < RegisterAfterPreview /> }
97
97
{ data ?. modal ?. name === 'resetPasswordSent' && < ResetPasswordSent /> }
98
98
{ /* eslint-enable */ }
99
99
</ div >
0 commit comments