Skip to content

Commit d30eb90

Browse files
committed
updated cosync storage for React Native
1 parent f8e7392 commit d30eb90

File tree

6 files changed

+6556
-7072
lines changed

6 files changed

+6556
-7072
lines changed

CosyncStorage/CosyncStorageReactNative/android/app/src/main/java/com/cosyncstoragereactnative/MainActivity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
package com.cosyncstoragereactnative;
2-
2+
import android.os.Bundle;
33
import com.facebook.react.ReactActivity;
44
import com.facebook.react.ReactActivityDelegate;
55
import com.facebook.react.ReactRootView;
66

77
public class MainActivity extends ReactActivity {
88

9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(null);
12+
}
913
/**
1014
* Returns the name of the main component registered from JavaScript. This is used to schedule
1115
* rendering of the component.

CosyncStorage/CosyncStorageReactNative/components/UploadFile.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
import React, {useState} from 'react';
2828

2929
//Import all required component
30-
import { StyleSheet, View, Text } from 'react-native';
30+
import { StyleSheet, View, Text, Platform } from 'react-native';
3131
import Request from './Request';
32-
import * as Progress from 'react-native-progress';
32+
3333

3434
const UploadFile = props => {
3535

@@ -73,9 +73,12 @@ const UploadFile = props => {
7373
<View style={styles.container}>
7474

7575
<View style={styles.progressCircle}>
76-
77-
<Progress.Bar progress={progress/100} width={100} />
78-
76+
77+
<ActivityIndicator size='large'
78+
animating={true}
79+
hidesWhenStopped = {true}
80+
/>
81+
7982
<Text style={{ fontSize: 18 }}>{item.sizeType} </Text>
8083
{totalFileZise > 0 ? <Text>{totalFileZise } MB </Text> : null}
8184
<Text>{`${progress}%`}</Text>

CosyncStorage/CosyncStorageReactNative/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CosyncStorage/CosyncStorageReactNative/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@
1111
},
1212
"dependencies": {
1313
"@bam.tech/react-native-image-resizer": "^3.0.4",
14-
"@react-native-async-storage/async-storage": "^1.17.11",
14+
"@react-native-async-storage/async-storage": "^1.17.11",
1515
"@react-navigation/bottom-tabs": "^6.4.1",
1616
"@react-navigation/native": "^6.0.14",
1717
"@react-navigation/native-stack": "^6.9.2",
1818
"@realm/react": "^0.4.1",
19-
"deprecated-react-native-prop-types": "^2.3.0",
2019
"react": "18.1.0",
2120
"react-native": "0.70.6",
2221
"react-native-image-picker": "^4.10.1",
23-
"react-native-progress": "^5.0.0",
22+
"react-native-progress": "^5.0.0",
2423
"react-native-safe-area-context": "^4.4.1",
2524
"react-native-screens": "^3.18.2",
2625
"react-native-sound": "^0.11.2",
27-
"react-native-video": "^6.0.0-alpha.3",
26+
"react-native-video": "^6.0.0-alpha.3",
2827
"realm": "^11.3.0"
2928
},
3029
"devDependencies": {

CosyncStorage/CosyncStorageReactNative/screens/LoginScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import { AuthContext } from '../context/AuthContext';
4343

4444
const LoginScreen = props => {
4545

46-
let [userEmail, setUserEmail] = useState('tola1@cosync.io');
47-
let [userPassword, setUserPassword] = useState('qwerty');
46+
let [userEmail, setUserEmail] = useState('');
47+
let [userPassword, setUserPassword] = useState('');
4848
let [loading, setLoading] = useState(false);
4949
let [errortext, setErrortext] = useState('');
5050
const ref_input_pwd = useRef();

0 commit comments

Comments
 (0)