bump version in build.gradle, TestScreen - center spinner
This commit is contained in:
parent
9bab693c87
commit
fece52fe8c
|
@ -136,8 +136,8 @@ android {
|
||||||
applicationId "com.dawidwysokinski.zdamegzaminzawodowy"
|
applicationId "com.dawidwysokinski.zdamegzaminzawodowy"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 3
|
versionCode 4
|
||||||
versionName "2.0.3"
|
versionName "2.0.4"
|
||||||
}
|
}
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Query, Scalars } from 'libs/graphql';
|
||||||
import { AppStackParamList, Screen } from 'config/routing';
|
import { AppStackParamList, Screen } from 'config/routing';
|
||||||
import { QUERY_GENERATE_TEST_SIMILAR_QUALIFICATIONS_QUALIFICATION } from './queries';
|
import { QUERY_GENERATE_TEST_SIMILAR_QUALIFICATIONS_QUALIFICATION } from './queries';
|
||||||
|
|
||||||
|
import { StyleSheet } from 'react-native';
|
||||||
import { Container, Spinner } from 'native-base';
|
import { Container, Spinner } from 'native-base';
|
||||||
import QualificationNotFound from './components/QualificationNotFound/QualificationNotFound';
|
import QualificationNotFound from './components/QualificationNotFound/QualificationNotFound';
|
||||||
import Header from './components/Header/Header';
|
import Header from './components/Header/Header';
|
||||||
|
@ -50,15 +51,15 @@ const TestScreen = ({ route }: TestScreenProps) => {
|
||||||
)}`}
|
)}`}
|
||||||
/>
|
/>
|
||||||
{loading || networkStatus === NetworkStatus.refetch ? (
|
{loading || networkStatus === NetworkStatus.refetch ? (
|
||||||
<Content>
|
<Content contentContainerStyle={styles.spinnerWrapper}>
|
||||||
<Spinner color={variables.brandPrimary} />
|
<Spinner color={variables.brandPrimary} size="large" />
|
||||||
</Content>
|
</Content>
|
||||||
) : data?.qualification ? (
|
) : data?.qualification ? (
|
||||||
data?.generateTest?.length ? (
|
data?.generateTest?.length ? (
|
||||||
<Test
|
<Test
|
||||||
qualification={data.qualification}
|
qualification={data.qualification}
|
||||||
questions={data.generateTest}
|
questions={data.generateTest}
|
||||||
onReset={() => refetch(undefined)}
|
onReset={refetch}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Suggestions
|
<Suggestions
|
||||||
|
@ -72,4 +73,10 @@ const TestScreen = ({ route }: TestScreenProps) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
spinnerWrapper: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export default TestScreen;
|
export default TestScreen;
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import { Content as ContentNB } from 'native-base';
|
import { Content as ContentNB, NativeBase } from 'native-base';
|
||||||
|
|
||||||
export interface ContentProps {
|
export interface ContentProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
contentContainerStyle?: NativeBase.Content['contentContainerStyle'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Content = ({ children }: ContentProps) => {
|
const Content = ({ children, contentContainerStyle }: ContentProps) => {
|
||||||
return (
|
return (
|
||||||
<ContentNB padder contentContainerStyle={styles.contentContainer}>
|
<ContentNB
|
||||||
|
padder
|
||||||
|
contentContainerStyle={[styles.contentContainer, contentContainerStyle]}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</ContentNB>
|
</ContentNB>
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue