-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(onboarding): dot navigation and add more slides
- Loading branch information
Showing
7 changed files
with
544 additions
and
124 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 61 additions & 6 deletions
67
src/features/app_start/shared/illustration/useIllustration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,83 @@ | ||
import { useRef, useState } from 'react'; | ||
import { useMemo, useRef, useState } from 'react'; | ||
import { useMediaQuery, useTheme } from '@mui/material'; | ||
import { SwiperRef } from 'swiper/react'; | ||
import { useAppTranslation } from '@hooks/index'; | ||
import MeetingSchedules from '@assets/img/illustration_meetingSchedules.svg?url'; | ||
import MinistryAssignments from '@assets/img/illustration_ministryAssignments.svg?url'; | ||
import MultiPlattform from '@assets/img/illustration_multiPlattform.svg?url'; | ||
import OtherSchedules from '@assets/img/illustration_otherSchedules.svg?url'; | ||
import Secretary from '@assets/img/illustration_secretary.svg?url'; | ||
import Territories from '@assets/img/illustration_territories.svg?url'; | ||
|
||
const useIllustration = () => { | ||
const { t } = useAppTranslation(); | ||
|
||
const theme = useTheme(); | ||
const swiperRef = useRef<SwiperRef>(); | ||
|
||
const laptopUp = useMediaQuery(theme.breakpoints.up('laptop'), { | ||
noSsr: true, | ||
}); | ||
|
||
const [index, setIndex] = useState(0); | ||
const [currentImage, setCurrentImage] = useState(0); | ||
|
||
const dotSize = useMemo(() => { | ||
if (laptopUp) { | ||
return { active: 16, inactive: 12 }; | ||
} | ||
|
||
const dotSize = laptopUp | ||
? { active: 16, inactive: 12 } | ||
: { active: 12, inactive: 8 }; | ||
return { active: 12, inactive: 8 }; | ||
}, [laptopUp]); | ||
|
||
const slides = useMemo(() => { | ||
return [ | ||
{ | ||
title: t('tr_illustrationMinistryAssignmentsHeader'), | ||
desc: t('tr_illustrationMinistryAssignmentsDescription'), | ||
src: MinistryAssignments, | ||
}, | ||
{ | ||
title: t('tr_illustrationMultiPlattformHeader'), | ||
desc: t('tr_illustrationMultiPlattformDescription'), | ||
src: MultiPlattform, | ||
}, | ||
{ | ||
title: t('tr_illustrationMeetingSchedulesHeader'), | ||
desc: t('tr_illustrationMeetingSchedulesDescription'), | ||
src: MeetingSchedules, | ||
}, | ||
{ | ||
title: t('tr_illustrationSecretaryHeader'), | ||
desc: t('tr_illustrationSecretaryDescription'), | ||
src: Secretary, | ||
}, | ||
{ | ||
title: t('tr_illustrationOtherSchedulesHeader'), | ||
desc: t('tr_illustrationOtherSchedulesDescription'), | ||
src: OtherSchedules, | ||
}, | ||
{ | ||
title: t('tr_illustrationTerritoriesHeader'), | ||
desc: t('tr_illustrationTerritoriesDescription'), | ||
src: Territories, | ||
}, | ||
]; | ||
}, [t]); | ||
|
||
const handleSlide = (n) => { | ||
if (swiperRef.current) { | ||
swiperRef.current.swiper.slideToLoop(n); | ||
} | ||
}; | ||
|
||
return { index, dotSize, setIndex, handleSlide, swiperRef }; | ||
return { | ||
currentImage, | ||
dotSize, | ||
setCurrentImage, | ||
handleSlide, | ||
swiperRef, | ||
slides, | ||
}; | ||
}; | ||
|
||
export default useIllustration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,5 +112,9 @@ | |
"tr_dataManagementTitle": "Data management", | ||
"tr_dataManagementDesc": "<p>You can access, correct, delete, or export your data in your profile settings or by contacting us at <a href='mailto:[email protected]'>[email protected]</a>. You can withdraw your consent anytime by deleting your account. Organized only collects data and cookies essential for app functionality. Data entered by your congregation’s elders is not managed by us. Your data (name, email, IP, device ID) is kept only as long as needed for app use, until your account is deleted, or as required by law.</p>", | ||
"tr_mfaVerifyTitle": "Let’s make sure it is you", | ||
"tr_mfaVerifyDesc": "Enter a code from your authenticator app" | ||
"tr_mfaVerifyDesc": "Enter a code from your authenticator app", | ||
"tr_illustrationTerritoriesHeader": "Manage territories effortlessly", | ||
"tr_illustrationTerritoriesDescription": "View and edit territories, see overdue and lost cards. Track “Do not calls”, assignment history and print new cards. Assign a territory to publisher, and they’ll see it in their list of territories. Track coverage statistics and export S-13 document.", | ||
"tr_illustrationOtherSchedulesHeader": "Many other useful schedules", | ||
"tr_illustrationOtherSchedulesDescription": "Organized makes scheduling hall cleaning, circuit overseer visit, hall mentencance work, public witnessing, congregation duties and other parts of congregation life easies for appointed brothers and easier to track and take part for publishers." | ||
} |