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