|
1 | 1 | import { useEffect, useRef } from 'react'; |
2 | 2 |
|
3 | | -import { LanguageToggle, NotificationHub, ThemeToggle } from '@douglasneuroinformatics/libui/components'; |
| 3 | +import { LanguageToggle, ThemeToggle } from '@douglasneuroinformatics/libui/components'; |
4 | 4 | import { useNotificationsStore } from '@douglasneuroinformatics/libui/hooks'; |
| 5 | +import { CoreProvider } from '@douglasneuroinformatics/libui/providers'; |
5 | 6 | import { Branding, InstrumentRenderer } from '@opendatacapture/react-core'; |
6 | 7 | import type { InstrumentSubmitHandler } from '@opendatacapture/react-core'; |
7 | 8 | import type { UpdateRemoteAssignmentData } from '@opendatacapture/schemas/assignment'; |
@@ -52,31 +53,32 @@ export const Root = ({ id, initialSeriesIndex, target, token }: RootProps) => { |
52 | 53 | }; |
53 | 54 |
|
54 | 55 | return ( |
55 | | - <div className="flex h-screen flex-col" ref={ref} style={{ display: 'none' }}> |
56 | | - <header className="fixed top-0 z-10 w-full bg-white/80 text-slate-700 shadow-sm backdrop-blur-lg dark:bg-slate-800/75 dark:text-slate-300"> |
57 | | - <div className="container flex items-center justify-between py-3 font-medium"> |
58 | | - <Branding className="[&>span]:hidden sm:[&>span]:block" fontSize="md" /> |
59 | | - <div className="flex gap-3"> |
60 | | - <ThemeToggle className="h-9 w-9" /> |
61 | | - <LanguageToggle |
62 | | - options={{ |
63 | | - en: 'English', |
64 | | - fr: 'Français' |
65 | | - }} |
66 | | - triggerClassName="h-9 w-9" |
67 | | - /> |
| 56 | + <CoreProvider> |
| 57 | + <div className="flex h-screen flex-col" ref={ref} style={{ display: 'none' }}> |
| 58 | + <header className="fixed top-0 z-10 w-full bg-white/80 text-slate-700 shadow-sm backdrop-blur-lg dark:bg-slate-800/75 dark:text-slate-300"> |
| 59 | + <div className="container flex items-center justify-between py-3 font-medium"> |
| 60 | + <Branding className="[&>span]:hidden sm:[&>span]:block" fontSize="md" /> |
| 61 | + <div className="flex gap-3"> |
| 62 | + <ThemeToggle className="h-9 w-9" /> |
| 63 | + <LanguageToggle |
| 64 | + options={{ |
| 65 | + en: 'English', |
| 66 | + fr: 'Français' |
| 67 | + }} |
| 68 | + triggerClassName="h-9 w-9" |
| 69 | + /> |
| 70 | + </div> |
68 | 71 | </div> |
69 | | - </div> |
70 | | - </header> |
71 | | - <main className="container flex min-h-0 max-w-3xl grow flex-col pb-16 pt-32 xl:max-w-5xl"> |
72 | | - <InstrumentRenderer |
73 | | - className="min-h-full w-full" |
74 | | - initialSeriesIndex={initialSeriesIndex} |
75 | | - target={target} |
76 | | - onSubmit={handleSubmit} |
77 | | - /> |
78 | | - </main> |
79 | | - <NotificationHub /> |
80 | | - </div> |
| 72 | + </header> |
| 73 | + <main className="container flex min-h-0 max-w-3xl grow flex-col pb-16 pt-32 xl:max-w-5xl"> |
| 74 | + <InstrumentRenderer |
| 75 | + className="min-h-full w-full" |
| 76 | + initialSeriesIndex={initialSeriesIndex} |
| 77 | + target={target} |
| 78 | + onSubmit={handleSubmit} |
| 79 | + /> |
| 80 | + </main> |
| 81 | + </div> |
| 82 | + </CoreProvider> |
81 | 83 | ); |
82 | 84 | }; |
0 commit comments