11import './style.scss' ;
2- import { useLoaderData , useNavigate } from '@tanstack/react-router' ;
2+ import { useQuery } from '@tanstack/react-query' ;
3+ import { useNavigate } from '@tanstack/react-router' ;
34import { useMemo , useState } from 'react' ;
45import { m } from '../../paraglide/messages' ;
6+ import { AppleHelpModal } from '../../shared/components/AppleHelpModal/AppleHelpModal' ;
57import { Page } from '../../shared/components/Page/Page' ;
68import { PageNavigation } from '../../shared/components/PageNavigation/PageNavigation' ;
79import { EnrollmentStep } from '../../shared/components/Step/Step' ;
@@ -16,19 +18,16 @@ import { ModalControls } from '../../shared/defguard-ui/components/ModalControls
1618import { SizedBox } from '../../shared/defguard-ui/components/SizedBox/SizedBox' ;
1719import { ThemeSpacing } from '../../shared/defguard-ui/types' ;
1820import { isPresent } from '../../shared/defguard-ui/utils/isPresent' ;
21+ import { getClientArtifactsQueryOptions } from '../../shared/query/queryOptions' ;
1922import { openVirtualLink } from '../../shared/utils/openVirtualLink' ;
2023import androidIcon from './assets/android.png' ;
21- import apple_video_src from './assets/apple_hardware_help.mp4' ;
2224import iosIcon from './assets/ios.png' ;
2325import laptopIcon from './assets/laptop.png' ;
2426import desktopIcon from './assets/pc-tower.png' ;
2527
26- // open link in onClick handler
27-
2828export const ClientDownloadPage = ( ) => {
29- const pageData = useLoaderData ( {
30- from : '/download' ,
31- } ) ;
29+ const { data : pageData } = useQuery ( getClientArtifactsQueryOptions ) ;
30+
3231 const navigate = useNavigate ( ) ;
3332
3433 const [ confirmModalOpen , setConfirmModalOpen ] = useState ( false ) ;
@@ -163,6 +162,12 @@ export const ClientDownloadPage = () => {
163162 icon = { iosIcon }
164163 />
165164 </ div >
165+ < AppleHelpModal
166+ isOpen = { appleHelpModalOpen }
167+ onClose = { ( ) => {
168+ setAppleHelpModalOpen ( false ) ;
169+ } }
170+ />
166171 < Modal
167172 title = { m . client_download_modal_title ( ) }
168173 size = "small"
@@ -188,37 +193,6 @@ export const ClientDownloadPage = () => {
188193 } }
189194 />
190195 </ Modal >
191- < Modal
192- title = { m . client_download_apple_help_title ( ) }
193- size = "small"
194- isOpen = { appleHelpModalOpen }
195- onClose = { ( ) => {
196- setAppleHelpModalOpen ( false ) ;
197- } }
198- >
199- < p > { m . client_download_apple_help_content_1 ( ) } </ p >
200- < SizedBox height = { ThemeSpacing . Xl } />
201- < video
202- controls
203- playsInline
204- preload = "metadata"
205- src = { apple_video_src }
206- style = { {
207- width : '100%' ,
208- height : 'auto' ,
209- } }
210- />
211- < SizedBox height = { ThemeSpacing . Xl } />
212- < p > { m . client_download_apple_help_content_2 ( ) } </ p >
213- < ModalControls
214- submitProps = { {
215- text : m . controls_got_it ( ) ,
216- onClick : ( ) => {
217- setAppleHelpModalOpen ( false ) ;
218- } ,
219- } }
220- />
221- </ Modal >
222196 < PageNavigation
223197 backText = { m . controls_back ( ) }
224198 onBack = { ( ) => {
0 commit comments