Fixed on android

This commit is contained in:
Stepan 2026-01-06 23:18:33 +01:00
parent 7570c59c8e
commit 6ced9091b3
5 changed files with 11 additions and 6 deletions

View File

@ -61,7 +61,7 @@ const TestScreen = () => {
<View className="gap-4">
{data.questions?.map((question) => (
<Question key={question.id} question={question} />
<Question key={question.id} question={question} onPress={() => router.push(`/questions/${question.id}`)} />
))}
</View>
</Content>

View File

@ -8,7 +8,7 @@ interface ContentProps extends ScrollViewProps {
const Content = forwardRef<ScrollView, ContentProps>(({ children, style, ...rest }, ref) => {
return (
<ScrollView ref={ref} style={[styles.content, style]} {...rest}>
<ScrollView ref={ref} contentContainerStyle={[styles.content, style]} {...rest}>
{children}
</ScrollView>
);
@ -18,7 +18,9 @@ Content.displayName = "Content";
const styles = StyleSheet.create({
content: {
padding: ContentPadding
paddingHorizontal: ContentPadding,
paddingTop: ContentPadding + 30,
paddingBottom: ContentPadding + 20
}
});

View File

@ -36,7 +36,7 @@ const CustomSelect = ({
return (
<Select className={className} onValueChange={onValueChange} selectedValue={selectedValue} defaultValue={defaultValue}>
<SelectTrigger variant="outline" size="md" style={{ backgroundColor }}>
<SelectTrigger className="justify-between" variant="outline" size="md" style={{ backgroundColor }}>
<SelectInput placeholder={placeholder} />
<FontAwesome5 className="mr-3" name="chevron-down" />
</SelectTrigger>

View File

@ -8,7 +8,7 @@ import { Platform } from 'react-native';
const tintColorLight = '#0a7ea4';
const tintColorDark = '#fff';
export const ContentPadding = 32;
export const ContentPadding = 20;
export const Colors = {
light: {

View File

@ -1,7 +1,10 @@
import { AxiosError } from "axios";
import { Platform } from "react-native";
function getErrorAxiosMessage(error: unknown) {
if(Platform.OS === 'web') {
console.error(error);
}
if (error instanceof AxiosError) {
let message = error.response?.data?.detail ||error.response?.data?.message || "Unknown Network Error";