File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { toBasicISOString , toLowerCase } from '@douglasneuroinformatics/libjs' ;
2- import { AlertDialog , LanguageToggle , ThemeToggle } from '@douglasneuroinformatics/libui/components' ;
2+ import { Button , Dialog , LanguageToggle , ThemeToggle } from '@douglasneuroinformatics/libui/components' ;
33import { useTranslation } from '@douglasneuroinformatics/libui/hooks' ;
44import { Branding } from '@opendatacapture/react-core' ;
55import { isSubjectWithPersonalInfo , removeSubjectIdScope } from '@opendatacapture/subject-utils' ;
@@ -43,35 +43,37 @@ export const Sidebar = () => {
4343 />
4444 ) ) }
4545 { i === navItems . length - 1 && (
46- < AlertDialog >
47- < AlertDialog . Trigger asChild >
46+ < Dialog >
47+ < Dialog . Trigger asChild >
4848 < NavButton
4949 disabled = { currentSession === null }
5050 icon = { StopCircle }
5151 isActive = { false }
5252 label = { t ( 'layout.navLinks.endSession' ) }
5353 url = "#"
5454 />
55- </ AlertDialog . Trigger >
56- < AlertDialog . Content >
57- < AlertDialog . Header >
58- < AlertDialog . Title > { t ( 'layout.endSessionModal.title' ) } </ AlertDialog . Title >
59- < AlertDialog . Description > { t ( 'layout.endSessionModal.message' ) } </ AlertDialog . Description >
60- </ AlertDialog . Header >
61- < AlertDialog . Footer >
62- < AlertDialog . Action
63- className = "min-w-24 "
55+ </ Dialog . Trigger >
56+ < Dialog . Content >
57+ < Dialog . Header >
58+ < Dialog . Title > { t ( 'layout.endSessionModal.title' ) } </ Dialog . Title >
59+ < Dialog . Description > { t ( 'layout.endSessionModal.message' ) } </ Dialog . Description >
60+ </ Dialog . Header >
61+ < Dialog . Footer >
62+ < Button
63+ className = "min-w-20 "
6464 onClick = { ( ) => {
6565 endSession ( ) ;
6666 void navigate ( { to : '/session/start-session' } ) ;
6767 } }
6868 >
6969 { t ( 'core.yes' ) }
70- </ AlertDialog . Action >
71- < AlertDialog . Cancel className = "min-w-24" > { t ( 'core.no' ) } </ AlertDialog . Cancel >
72- </ AlertDialog . Footer >
73- </ AlertDialog . Content >
74- </ AlertDialog >
70+ </ Button >
71+ < Button className = "min-w-20" variant = "outline" >
72+ { t ( 'core.no' ) }
73+ </ Button >
74+ </ Dialog . Footer >
75+ </ Dialog . Content >
76+ </ Dialog >
7577 ) }
7678 </ div >
7779 ) ) }
You can’t perform that action at this time.
0 commit comments