From bc347c3f053339b6e9c452a545dd62d07257cadb Mon Sep 17 00:00:00 2001 From: Stepan Date: Tue, 6 Jan 2026 23:41:08 +0100 Subject: [PATCH] Content for web and mobile --- components/ui/content.tsx | 45 +++++++++++++++++++++++++++++---------- components/user-test.tsx | 4 ++-- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/components/ui/content.tsx b/components/ui/content.tsx index b753e37..eab38e7 100644 --- a/components/ui/content.tsx +++ b/components/ui/content.tsx @@ -1,18 +1,41 @@ import { ContentPadding } from "@/constants/theme"; import { forwardRef } from "react"; -import { ScrollView, ScrollViewProps, StyleSheet } from "react-native"; +import { + Platform, + ScrollView, + ScrollViewProps, + StyleSheet, +} from "react-native"; interface ContentProps extends ScrollViewProps { children?: React.ReactNode; } -const Content = forwardRef(({ children, style, ...rest }, ref) => { - return ( - - {children} - - ); -}); +const Content = forwardRef( + ({ children, style, ...rest }, ref) => { + return ( + <> + {Platform.OS === "web" ? ( + + {children} + + ) : ( + + {children} + + )} + + ); + } +); Content.displayName = "Content"; @@ -20,8 +43,8 @@ const styles = StyleSheet.create({ content: { paddingHorizontal: ContentPadding, paddingTop: ContentPadding + 30, - paddingBottom: ContentPadding + 20 - } + paddingBottom: ContentPadding + 20, + }, }); -export default Content; \ No newline at end of file +export default Content; diff --git a/components/user-test.tsx b/components/user-test.tsx index eef1254..e64a270 100644 --- a/components/user-test.tsx +++ b/components/user-test.tsx @@ -87,9 +87,9 @@ const UserTest = ({ userTest, onPress }: UserTestProps) => { {userTest.answers.length} Questions - + {testStatus !== TestStatus.InProgress && {successAnswers} / {userTest.answers.length} Correct - + }