Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
APPOIO
Frontend
Commits
01eae2d2
Commit
01eae2d2
authored
4 years ago
by
ecardoso
Browse files
Options
Download
Email Patches
Plain Diff
Melhorando o components/LoaderComponent.js
parent
7f56aab8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/components/LoaderComponent.js
+18
-3
src/components/LoaderComponent.js
src/screens/AppSelectionScreen.js
+1
-18
src/screens/AppSelectionScreen.js
src/screens/AppoioStepScreen.js
+1
-18
src/screens/AppoioStepScreen.js
src/screens/CreateAccountScreen.js
+1
-18
src/screens/CreateAccountScreen.js
src/screens/CuradoriaScreen.js
+1
-1
src/screens/CuradoriaScreen.js
src/screens/LoginScreen.js
+1
-18
src/screens/LoginScreen.js
with
23 additions
and
76 deletions
+23
-76
src/components/LoaderComponent.js
View file @
01eae2d2
import
React
from
'
react
'
;
import
{
ActivityIndicator
}
from
'
react-native
'
;
import
{
ActivityIndicator
,
StyleSheet
}
from
'
react-native
'
;
import
colors
from
'
../constants/colors
'
;
export
default
function
LoaderComponent
({
color
})
{
return
<
ActivityIndicator
size
=
{
100
}
color
=
{
color
}
/>
;
export
default
function
LoaderComponent
({
color
,
isActivityIndicator
})
{
return
isActivityIndicator
?
(
<
ActivityIndicator
size
=
{
100
}
color
=
{
color
}
/
>
)
:
(
<
View
style
=
{
loaderStyles
.
loader
}
>
<
ActivityIndicator
size
=
{
100
}
color
=
"
#FFF
"
/>
<
/View
>
);
}
const
loaderStyles
=
StyleSheet
.
create
({
loader
:
{
flex
:
1
,
alignItems
:
'
center
'
,
backgroundColor
:
colors
.
primary
,
justifyContent
:
'
center
'
,
},
});
This diff is collapsed.
Click to expand it.
src/screens/AppSelectionScreen.js
View file @
01eae2d2
...
...
@@ -18,23 +18,6 @@ import LoaderComponent from '../components/LoaderComponent';
import
APPS
from
'
../constants/apps
'
;
import
{
updateInstalledApps
}
from
'
../api
'
;
function
LoaderScreen
()
{
const
loaderStyles
=
StyleSheet
.
create
({
loader
:
{
flex
:
1
,
alignItems
:
'
center
'
,
backgroundColor
:
colors
.
primary
,
justifyContent
:
'
center
'
,
},
});
return
(
<
View
style
=
{
loaderStyles
.
loader
}
>
<
LoaderComponent
color
=
"
#FFF
"
/>
<
/View
>
);
}
export
default
function
AppSelectionScreen
({
navigation
,
route
})
{
const
[
isLoading
,
setIsLoading
]
=
React
.
useState
(
false
);
const
[
appsInstalled
,
setAppInstalled
]
=
useState
(
...
...
@@ -70,7 +53,7 @@ export default function AppSelectionScreen({ navigation, route }) {
}
return
isLoading
?
(
<
Loader
Screen
/>
<
Loader
Component
isActivityIndicator
=
"
false
"
/>
)
:
(
<
View
style
=
{
styles
.
screen
}
>
<
HeaderComponent
...
...
This diff is collapsed.
Click to expand it.
src/screens/AppoioStepScreen.js
View file @
01eae2d2
...
...
@@ -16,23 +16,6 @@ import StepComponent from '../components/StepComponent';
import
{
registerAppoio
}
from
'
../api
'
;
import
colors
from
'
../constants/colors
'
;
function
LoaderScreen
()
{
const
loaderStyles
=
StyleSheet
.
create
({
loader
:
{
flex
:
1
,
alignItems
:
'
center
'
,
backgroundColor
:
colors
.
primary
,
justifyContent
:
'
center
'
,
},
});
return
(
<
View
style
=
{
loaderStyles
.
loader
}
>
<
LoaderComponent
color
=
"
#FFF
"
/>
<
/View
>
);
}
export
default
function
AppoioStepScreen
({
route
,
navigation
})
{
const
[
isLoading
,
setIsLoading
]
=
React
.
useState
(
false
);
const
[
steps
,
setSteps
]
=
React
.
useState
([
...
...
@@ -123,7 +106,7 @@ export default function AppoioStepScreen({ route, navigation }) {
}
return
isLoading
?
(
<
Loader
Screen
/>
<
Loader
Component
isActivityIndicator
=
"
false
"
/>
)
:
(
<
View
style
=
{
styles
.
screen
}
>
<
Header
...
...
This diff is collapsed.
Click to expand it.
src/screens/CreateAccountScreen.js
View file @
01eae2d2
...
...
@@ -26,23 +26,6 @@ import ButtonGroupComponent from '../components/ButtonGroupComponent';
import
Icon
from
'
react-native-vector-icons/Feather
'
;
import
api
from
'
../api
'
;
function
LoaderScreen
()
{
const
loaderStyles
=
StyleSheet
.
create
({
loader
:
{
flex
:
1
,
alignItems
:
'
center
'
,
backgroundColor
:
colors
.
primary
,
justifyContent
:
'
center
'
,
},
});
return
(
<
View
style
=
{
loaderStyles
.
loader
}
>
<
LoaderComponent
color
=
"
#FFF
"
/>
<
/View
>
);
}
export
default
function
CreateAccountScreen
({
navigation
})
{
const
[
chosenOptionState
,
setChosenOptionState
]
=
useState
(
null
);
const
[
chosenOptionYear
,
setChosenOptionYear
]
=
useState
(
null
);
...
...
@@ -142,7 +125,7 @@ export default function CreateAccountScreen({ navigation }) {
};
return
isLoading
?
(
<
Loader
Screen
/>
<
Loader
Component
isActivityIndicator
=
"
false
"
/>
)
:
(
<
View
style
=
{
styles
.
screen
}
>
<
Header
...
...
This diff is collapsed.
Click to expand it.
src/screens/CuradoriaScreen.js
View file @
01eae2d2
...
...
@@ -50,7 +50,7 @@ export default function CuradoriaScreen({ navigation }) {
<
/HeaderComponent
>
<
BodyComponent
>
{
isLoading
?
(
<
LoaderComponent
color
=
{
colors
.
primary
}
/
>
<
LoaderComponent
color
=
{
colors
.
primary
}
isActivityIndicator
=
"
true
"
/>
)
:
tutorials
.
length
>
0
?
(
tutorials
.
map
(
tutorial
=>
(
<
TutorialCard
...
...
This diff is collapsed.
Click to expand it.
src/screens/LoginScreen.js
View file @
01eae2d2
...
...
@@ -26,23 +26,6 @@ import ButtonComponent from '../components/ButtonComponent';
import
FooterComponent
from
'
../components/FooterComponent
'
;
import
LoaderComponent
from
'
../components/LoaderComponent
'
;
function
LoaderScreen
()
{
const
loaderStyles
=
StyleSheet
.
create
({
loader
:
{
flex
:
1
,
alignItems
:
'
center
'
,
backgroundColor
:
colors
.
primary
,
justifyContent
:
'
center
'
,
},
});
return
(
<
View
style
=
{
loaderStyles
.
loader
}
>
<
LoaderComponent
color
=
"
#FFF
"
/>
<
/View
>
);
}
export
default
function
LoginScreen
({
navigation
})
{
const
[
email
,
setEmail
]
=
useState
(
null
);
const
[
password
,
setPassword
]
=
useState
(
null
);
...
...
@@ -96,7 +79,7 @@ export default function LoginScreen({ navigation }) {
}
return
isLoading
?
(
<
Loader
Screen
/>
<
Loader
Component
isActivityIndicator
=
"
false
"
/>
)
:
(
<
ScrollView
style
=
{
styles
.
screen
}
>
<
Header
large
>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment