Oleksandr Honcharov 1 год назад
Родитель
Сommit
9e08ab112f

+ 14 - 0
src/components/Loading/index.tsx

@@ -0,0 +1,14 @@
+import React from 'react';
+import { View } from 'react-native';
+
+import Logo from '../../../assets/images/logo.svg';
+
+const Loading = () => {
+  return (
+    <View style={{ width: '100%', height: '100%', justifyContent: 'center', alignItems: 'center' }}>
+      <Logo width={96} height={96} />
+    </View>
+  );
+};
+
+export default Loading;

+ 1 - 0
src/components/index.ts

@@ -9,3 +9,4 @@ export * from './AvatarPicker';
 export * from './FlatList';
 export * from './RegionPopup';
 export * from './LocationPopup';
+export * from './Loading';

+ 2 - 1
src/screens/InAppScreens/ProfileScreen/Profile/edit-personal-info.tsx

@@ -31,6 +31,7 @@ import XIcon from '../../../../../assets/icons/x(twitter).svg';
 import YoutubeIcon from '../../../../../assets/icons/youtube.svg';
 import GlobeIcon from '../../../../../assets/icons/bottom-navigation/globe.svg';
 import LinkIcon from '../../../../../assets/icons/link.svg';
+import Loading from '../../../../components/Loading';
 
 const ProfileSchema = yup.object({
   username: yup.string().optional(),
@@ -61,7 +62,7 @@ export const EditPersonalInfo = () => {
 
   const regions = useGetRegionsWithFlagQuery(true);
 
-  if (!data) return <Text>Loading</Text>;
+  if (!data) return <Loading />;
 
   const originRegion = regions.data?.data.find((region) => region.id === data.homebase);
   const secondOrigin = regions.data?.data.find((region) => region.id === data.homebase2);

+ 2 - 1
src/screens/InAppScreens/ProfileScreen/index.tsx

@@ -26,6 +26,7 @@ import IconYouTube from '../../../../assets/icons/youtube.svg';
 import IconGlobe from '../../../../assets/icons/bottom-navigation/globe.svg';
 import IconLink from '../../../../assets/icons/link.svg';
 import GearIcon from '../../../../assets/icons/gear.svg';
+import Loading from '../../../components/Loading';
 
 const Tab = createMaterialTopTabNavigator();
 
@@ -38,7 +39,7 @@ const ProfileScreen: FC<Props> = ({ navigation }) => {
 
   const { data, error } = usePostGetProfileInfoQuery(token, true);
 
-  if (!data) return <Text>Loading</Text>;
+  if (!data) return <Loading />;
 
   return (
     <PageWrapper>