From 71c49b4073df2180c57b52ab42aad7ab5160bffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Demirhan?= Date: Mon, 13 Jan 2025 00:00:03 +0100 Subject: [PATCH 1/6] feat(screen):Add AlertDialog for the Playtime screen for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- .../components/ContextualQuestionPlayTime.tsx | 82 ++++++++++++------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/app/src/components/ContextualQuestionPlayTime.tsx b/app/src/components/ContextualQuestionPlayTime.tsx index 1167985..f324275 100644 --- a/app/src/components/ContextualQuestionPlayTime.tsx +++ b/app/src/components/ContextualQuestionPlayTime.tsx @@ -1,48 +1,70 @@ -import { Button, Text } from '@shadcn/components'; -import { iconWithClassName } from '@shadcn/icons/iconWithClassName'; -import type { ContextualQuestionProps } from '@src/types'; -import { useFormikContext } from 'formik'; -import LottieView from 'lottie-react-native'; -import { TimerIcon } from 'lucide-react-native'; -import { useState } from 'react'; -import { View } from 'react-native'; -import { Slider } from 'react-native-awesome-slider'; -import { useSharedValue } from 'react-native-reanimated'; +import { Button, Text } from "@shadcn/components"; +import { + AlertDialog, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@shadcn/components/ui/alert-dialog"; +import { iconWithClassName } from "@shadcn/icons/iconWithClassName"; +import type { ContextualQuestionProps } from "@src/types"; +import { useFormikContext } from "formik"; +import LottieView from "lottie-react-native"; +import { HelpCircle, TimerIcon, X } from "lucide-react-native"; +import { useState } from "react"; +import { View } from "react-native"; +import { Slider } from "react-native-awesome-slider"; +import { useSharedValue } from "react-native-reanimated"; +import { InfoAlertIcon } from "./InfoAlert"; iconWithClassName(TimerIcon); -export const ContextualQuestionPlayTime: React.FC = () => { +export const ContextualQuestionPlayTime: React.FC< + ContextualQuestionProps +> = () => { const { setFieldValue, values } = useFormikContext<{ time: number }>(); const [sliderValue, setSliderValue] = useState(values.time); const onChange = (value: number) => { setSliderValue(value); - setFieldValue('time', value); + setFieldValue("time", value); }; return ( - - + + - - - How much time can you sneak in today? - - - + + + + How much time can you sneak in today? + + + + + + = () bubbleTextStyle={{ fontSize: 14 }} bubble={(value) => `${value} min`} renderThumb={() => ( - )} /> - - - 5 min - 30 min+ + + + 5 min + 30 min+ From efcb0513e5821c022c48b4bf9ec72a599e7727af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Demirhan?= Date: Tue, 14 Jan 2025 21:15:38 +0100 Subject: [PATCH 2/6] feat(screen):Delete unused components for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- app/src/components/ContextualQuestionPlayTime.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/components/ContextualQuestionPlayTime.tsx b/app/src/components/ContextualQuestionPlayTime.tsx index f324275..169b6f1 100644 --- a/app/src/components/ContextualQuestionPlayTime.tsx +++ b/app/src/components/ContextualQuestionPlayTime.tsx @@ -1,19 +1,8 @@ import { Button, Text } from "@shadcn/components"; -import { - AlertDialog, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogTrigger, -} from "@shadcn/components/ui/alert-dialog"; import { iconWithClassName } from "@shadcn/icons/iconWithClassName"; import type { ContextualQuestionProps } from "@src/types"; import { useFormikContext } from "formik"; import LottieView from "lottie-react-native"; -import { HelpCircle, TimerIcon, X } from "lucide-react-native"; import { useState } from "react"; import { View } from "react-native"; import { Slider } from "react-native-awesome-slider"; From 3fa34ddc8efd6ed6bde116e42710eddacbe2a3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Demirhan?= Date: Tue, 14 Jan 2025 21:16:46 +0100 Subject: [PATCH 3/6] fix(screen):Import missing components for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- app/src/components/ContextualQuestionPlayTime.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/components/ContextualQuestionPlayTime.tsx b/app/src/components/ContextualQuestionPlayTime.tsx index 169b6f1..c4e0fc2 100644 --- a/app/src/components/ContextualQuestionPlayTime.tsx +++ b/app/src/components/ContextualQuestionPlayTime.tsx @@ -8,6 +8,7 @@ import { View } from "react-native"; import { Slider } from "react-native-awesome-slider"; import { useSharedValue } from "react-native-reanimated"; import { InfoAlertIcon } from "./InfoAlert"; +import { TimerIcon } from "lucide-react-native"; iconWithClassName(TimerIcon); From c2fe7b23b6b3a66d4a282a34092ee411ff9cb2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Demirhan?= Date: Tue, 14 Jan 2025 21:56:19 +0100 Subject: [PATCH 4/6] feat(screen):Align info icon next to the text for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- .../components/ContextualQuestionPlayTime.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/src/components/ContextualQuestionPlayTime.tsx b/app/src/components/ContextualQuestionPlayTime.tsx index c4e0fc2..cd8aab4 100644 --- a/app/src/components/ContextualQuestionPlayTime.tsx +++ b/app/src/components/ContextualQuestionPlayTime.tsx @@ -34,19 +34,21 @@ export const ContextualQuestionPlayTime: React.FC< /> - - - How much time can you sneak in today? + + + How much time can you sneak in - + + today? + + - Date: Tue, 14 Jan 2025 21:59:16 +0100 Subject: [PATCH 5/6] fix(screen):Fix biome errors for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- .../components/ContextualQuestionPlayTime.tsx | 70 +++++++++---------- 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/app/src/components/ContextualQuestionPlayTime.tsx b/app/src/components/ContextualQuestionPlayTime.tsx index cd8aab4..f2522cb 100644 --- a/app/src/components/ContextualQuestionPlayTime.tsx +++ b/app/src/components/ContextualQuestionPlayTime.tsx @@ -1,62 +1,58 @@ -import { Button, Text } from "@shadcn/components"; -import { iconWithClassName } from "@shadcn/icons/iconWithClassName"; -import type { ContextualQuestionProps } from "@src/types"; -import { useFormikContext } from "formik"; -import LottieView from "lottie-react-native"; -import { useState } from "react"; -import { View } from "react-native"; -import { Slider } from "react-native-awesome-slider"; -import { useSharedValue } from "react-native-reanimated"; -import { InfoAlertIcon } from "./InfoAlert"; -import { TimerIcon } from "lucide-react-native"; +import { Button, Text } from '@shadcn/components'; +import { iconWithClassName } from '@shadcn/icons/iconWithClassName'; +import type { ContextualQuestionProps } from '@src/types'; +import { useFormikContext } from 'formik'; +import LottieView from 'lottie-react-native'; +import { TimerIcon } from 'lucide-react-native'; +import { useState } from 'react'; +import { View } from 'react-native'; +import { Slider } from 'react-native-awesome-slider'; +import { useSharedValue } from 'react-native-reanimated'; +import { InfoAlertIcon } from './InfoAlert'; iconWithClassName(TimerIcon); -export const ContextualQuestionPlayTime: React.FC< - ContextualQuestionProps -> = () => { +export const ContextualQuestionPlayTime: React.FC = () => { const { setFieldValue, values } = useFormikContext<{ time: number }>(); const [sliderValue, setSliderValue] = useState(values.time); const onChange = (value: number) => { setSliderValue(value); - setFieldValue("time", value); + setFieldValue('time', value); }; return ( - - + + - - - - How much time can you sneak in - - - today? + + + How much time can you sneak in + + today? - + `${value} min`} renderThumb={() => ( - )} /> - - - 5 min - 30 min+ + + + 5 min + 30 min+ From 4e19b85ca1b3cf190707ec572539520e90bf72f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Demirhan?= Date: Tue, 14 Jan 2025 22:29:37 +0100 Subject: [PATCH 6/6] fix(screen):Fix biome errors for the Issue #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kübra Demirhan --- app/src/routes/AuthRoutes.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/routes/AuthRoutes.tsx b/app/src/routes/AuthRoutes.tsx index ab3915c..1918a84 100644 --- a/app/src/routes/AuthRoutes.tsx +++ b/app/src/routes/AuthRoutes.tsx @@ -50,7 +50,7 @@ export const AuthRoutes: React.FC = () => { }, []); if (isLoading) { - return ; + return ; } return (