Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
4d801008
Commit
4d801008
authored
Oct 09, 2021
by
Faraz
Browse files
refactor: update Ecosystem type in EcosystemListScreen.tsx
parent
6581eee6
Pipeline
#86120
passed with stage
in 9 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/screens/CategoryEcosystemListScreen.tsx
View file @
4d801008
...
...
@@ -5,9 +5,7 @@ import { useNavigation } from "@react-navigation/core";
import
Colors
from
"
../constants/Colors
"
;
import
{
View
}
from
"
../components/Themed
"
;
import
Spacer
from
"
../components/Spacer/Spacer
"
;
import
{
IEcosystem
}
from
"
../types/firestore/ecosystem
"
;
import
{
IEcosystemList
}
from
"
../types/ecosystemList
"
;
import
PlainForm
from
"
../components/Forms/PlainForm
"
;
import
{
IEcosystem
}
from
"
../types/firestore/ecosystems
"
;
import
IconForm
from
"
../components/Forms/IconForm
"
;
const
CategoryEcosystemListScreen
=
()
=>
{
...
...
@@ -64,20 +62,6 @@ const CategoryEcosystemListScreen = () => {
},
]);
const
renderItem
=
({
item
}:
IEcosystem
)
=>
{
return
(
<
View
style
=
{
styles
.
horizontalCard
}
>
<
HorizontalCards
image
=
{
item
.
image
}
member
=
{
item
.
member
}
title
=
{
item
.
title
}
rate
=
{
item
.
rate
}
onPress
=
{
null
}
/>
</
View
>
);
};
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
View
>
...
...
@@ -91,7 +75,19 @@ const CategoryEcosystemListScreen = () => {
<
Spacer
variant
=
{
"
xl
"
}
/>
<
FlatList
data
=
{
listData
}
renderItem
=
{
renderItem
}
renderItem
=
{
({
item
})
=>
{
return
(
<
View
style
=
{
styles
.
horizontalCard
}
>
<
HorizontalCards
image
=
{
item
.
image
}
member
=
{
item
.
member
}
title
=
{
item
.
title
}
rate
=
{
item
.
rate
}
onPress
=
{
null
}
/>
</
View
>
);
}
}
keyExtractor
=
{
(
item
)
=>
item
.
id
}
ItemSeparatorComponent
=
{
()
=>
<
Spacer
variant
=
{
"
l
"
}
/>
}
showsVerticalScrollIndicator
=
{
false
}
...
...
src/screens/EcosystemListScreen.tsx
View file @
4d801008
...
...
@@ -5,7 +5,7 @@ import { useNavigation } from "@react-navigation/core";
import
Colors
from
"
../constants/Colors
"
;
import
{
View
}
from
"
../components/Themed
"
;
import
Spacer
from
"
../components/Spacer/Spacer
"
;
import
{
IEcosystem
}
from
"
../types/firestore/ecosystem
"
;
import
{
IEcosystem
}
from
"
../types/firestore/ecosystem
s
"
;
import
{
IEcosystemList
}
from
"
../types/ecosystemList
"
;
const
EcosystemListScreen
=
()
=>
{
...
...
@@ -61,25 +61,23 @@ const EcosystemListScreen = () => {
},
]);
const
renderItem
=
({
item
}:
IEcosystem
)
=>
{
return
(
<
View
style
=
{
styles
.
horizontalCard
}
>
<
HorizontalCards
image
=
{
item
.
image
}
member
=
{
item
.
member
}
title
=
{
item
.
title
}
rate
=
{
item
.
rate
}
onPress
=
{
null
}
/>
</
View
>
);
};
return
(
<
SafeAreaView
style
=
{
styles
.
container
}
>
<
FlatList
data
=
{
listData
}
renderItem
=
{
renderItem
}
renderItem
=
{
({
item
})
=>
{
return
(
<
View
style
=
{
styles
.
horizontalCard
}
>
<
HorizontalCards
image
=
{
item
.
image
}
member
=
{
item
.
member
}
title
=
{
item
.
title
}
rate
=
{
item
.
rate
}
onPress
=
{
null
}
/>
</
View
>
);
}
}
keyExtractor
=
{
(
item
)
=>
item
.
id
}
ItemSeparatorComponent
=
{
()
=>
<
Spacer
variant
=
{
"
l
"
}
/>
}
showsVerticalScrollIndicator
=
{
false
}
...
...
Write
Preview
Supports
Markdown
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