Fixed on android
This commit is contained in:
parent
7570c59c8e
commit
6ced9091b3
@ -61,7 +61,7 @@ const TestScreen = () => {
|
|||||||
|
|
||||||
<View className="gap-4">
|
<View className="gap-4">
|
||||||
{data.questions?.map((question) => (
|
{data.questions?.map((question) => (
|
||||||
<Question key={question.id} question={question} />
|
<Question key={question.id} question={question} onPress={() => router.push(`/questions/${question.id}`)} />
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ interface ContentProps extends ScrollViewProps {
|
|||||||
|
|
||||||
const Content = forwardRef<ScrollView, ContentProps>(({ children, style, ...rest }, ref) => {
|
const Content = forwardRef<ScrollView, ContentProps>(({ children, style, ...rest }, ref) => {
|
||||||
return (
|
return (
|
||||||
<ScrollView ref={ref} style={[styles.content, style]} {...rest}>
|
<ScrollView ref={ref} contentContainerStyle={[styles.content, style]} {...rest}>
|
||||||
{children}
|
{children}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
@ -18,7 +18,9 @@ Content.displayName = "Content";
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
content: {
|
content: {
|
||||||
padding: ContentPadding
|
paddingHorizontal: ContentPadding,
|
||||||
|
paddingTop: ContentPadding + 30,
|
||||||
|
paddingBottom: ContentPadding + 20
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const CustomSelect = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Select className={className} onValueChange={onValueChange} selectedValue={selectedValue} defaultValue={defaultValue}>
|
<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} />
|
<SelectInput placeholder={placeholder} />
|
||||||
<FontAwesome5 className="mr-3" name="chevron-down" />
|
<FontAwesome5 className="mr-3" name="chevron-down" />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { Platform } from 'react-native';
|
|||||||
const tintColorLight = '#0a7ea4';
|
const tintColorLight = '#0a7ea4';
|
||||||
const tintColorDark = '#fff';
|
const tintColorDark = '#fff';
|
||||||
|
|
||||||
export const ContentPadding = 32;
|
export const ContentPadding = 20;
|
||||||
|
|
||||||
export const Colors = {
|
export const Colors = {
|
||||||
light: {
|
light: {
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
import { AxiosError } from "axios";
|
import { AxiosError } from "axios";
|
||||||
|
import { Platform } from "react-native";
|
||||||
|
|
||||||
function getErrorAxiosMessage(error: unknown) {
|
function getErrorAxiosMessage(error: unknown) {
|
||||||
|
if(Platform.OS === 'web') {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
}
|
||||||
|
|
||||||
if (error instanceof AxiosError) {
|
if (error instanceof AxiosError) {
|
||||||
let message = error.response?.data?.detail ||error.response?.data?.message || "Unknown Network Error";
|
let message = error.response?.data?.detail ||error.response?.data?.message || "Unknown Network Error";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user