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
36453194
Commit
36453194
authored
Oct 09, 2021
by
Abraham Rudolf Brahmana
Committed by
Bagus Prabowo
Oct 09, 2021
Browse files
feat: Recommended screen navigation ecosystem
parent
4e700b18
Changes
10
Show whitespace changes
Inline
Side-by-side
src/navigation/EcosystemStackNavigator.tsx
View file @
36453194
...
...
@@ -2,18 +2,13 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack";
import
React
from
"
react
"
;
import
BusinessEcosystemScreen
from
"
../screens/ecosystem/BusinessEcosystemScreen
"
;
import
{
EcosystemStackParamList
}
from
"
../types/navigation/EcosystemStack
"
;
import
{
PopularEcosystemScreen
,
JoinedEcosystemScreen
,
MyEcosystemScreen
,
LatestEcosystemScreen
,
}
from
"
../screens/ecosystem/recomendation
"
;
import
{
BusinessCategoryScreen
,
BusinessListScreen
,
EcosystemDetailScreen
,
EcosystemListScreen
,
EcosystemMapScreen
,
RecommendedEcosystemScreen
,
}
from
"
../screens/ecosystem
"
;
const
EcosystemStack
=
createNativeStackNavigator
<
EcosystemStackParamList
>
();
...
...
@@ -27,24 +22,12 @@ const EcosystemStackNavigator = () => {
options
=
{
{
headerShown
:
false
}
}
/>
<
EcosystemStack
.
Screen
name
=
"MyEcosystem"
component
=
{
MyEcosystemScreen
}
options
=
{
{
title
:
"
Ekosistem Saya
"
}
}
/>
<
EcosystemStack
.
Screen
name
=
"Joined"
component
=
{
JoinedEcosystemScreen
}
options
=
{
{
title
:
"
Sudah Bergabung
"
}
}
/>
<
EcosystemStack
.
Screen
name
=
"Popular"
component
=
{
PopularEcosystemScreen
}
options
=
{
{
title
:
"
Paling Populer
"
}
}
/>
<
EcosystemStack
.
Screen
name
=
"Latest"
component
=
{
LatestEcosystemScreen
}
options
=
{
{
title
:
"
Terbaru Minggu Ini
"
}
}
name
=
"Recommended"
component
=
{
RecommendedEcosystemScreen
}
initialParams
=
{
{
headerTitle
:
""
,
}
}
options
=
{
({
route
})
=>
({
title
:
route
.
params
.
headerTitle
})
}
/>
<
EcosystemStack
.
Screen
name
=
"BusinessCategory"
...
...
src/navigation/RootNavigator.tsx
View file @
36453194
...
...
@@ -10,7 +10,6 @@ import { getUser } from "../redux/user/actions";
import
LandingScreen
from
"
../screens/auth/LandingScreen
"
;
import
firebase
from
"
firebase
"
;
import
{
Alert
}
from
"
react-native
"
;
import
CreateBusinessEcosystemScreen
from
"
../screens/CreateBusinessEcosystemScreen
"
;
/**
* A root stack navigator is often used for displaying modals on top of all other content.
...
...
@@ -74,11 +73,6 @@ const RootNavigator = () => {
component
=
{
SuccessChangePasswordScreen
}
options
=
{
{
headerShown
:
false
}
}
/>
<
RootStack
.
Screen
name
=
"CreateBusinessEcosystem"
component
=
{
CreateBusinessEcosystemScreen
}
options
=
{
{
title
:
""
}
}
/>
</
RootStack
.
Navigator
>
)
:
(
<
RootStack
.
Navigator
>
...
...
src/screens/ecosystem/BusinessEcosystemScreen.tsx
View file @
36453194
...
...
@@ -27,7 +27,13 @@ const BusinessEcosystemScreen = () => {
<
View
>
<
TouchableOpacity
onPress
=
{
()
=>
{
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
MyEcosystem
"
});
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
Recommended
"
,
params
:
{
headerTitle
:
"
Ekosistem Saya
"
,
toFetch
:
"
MyEcosystem
"
,
},
});
}
}
>
<
Text
style
=
{
styles
.
link
}
>
Ekosistem Saya
</
Text
>
...
...
@@ -59,7 +65,13 @@ const BusinessEcosystemScreen = () => {
<
View
>
<
TouchableOpacity
onPress
=
{
()
=>
{
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
Popular
"
});
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
Recommended
"
,
params
:
{
headerTitle
:
"
Paling Populer
"
,
toFetch
:
"
Popular
"
,
},
});
}
}
>
<
Text
style
=
{
styles
.
link
}
>
Paling Populer
</
Text
>
...
...
@@ -69,7 +81,13 @@ const BusinessEcosystemScreen = () => {
<
View
>
<
TouchableOpacity
onPress
=
{
()
=>
{
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
Latest
"
});
nav
.
navigate
(
"
Ecosystem
"
,
{
screen
:
"
Recommended
"
,
params
:
{
headerTitle
:
"
Terbaru Minggu Ini
"
,
toFetch
:
"
Latest
"
,
},
});
}
}
>
<
Text
style
=
{
styles
.
link
}
>
Terbaru Minggu Ini
</
Text
>
...
...
src/screens/ecosystem/
r
ecomend
ation/Join
edEcosystemScreen.tsx
→
src/screens/ecosystem/
R
ecom
m
endedEcosystemScreen.tsx
View file @
36453194
import
*
as
React
from
"
react
"
;
import
{
StyleSheet
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../../components/Themed
"
;
import
Colors
from
"
../../../constants/Colors
"
;
import
{
Alert
,
StyleSheet
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../components/Themed
"
;
import
Colors
from
"
../../constants/Colors
"
;
import
{
EcosystemStackScreenProps
}
from
"
../../types/navigation
"
;
const
RecommendedEcosystemScreen
=
({
route
,
}:
EcosystemStackScreenProps
<
"
Recommended
"
>
)
=>
{
const
{
toFetch
}
=
route
.
params
;
const
JoinedEcosystemScreen
=
()
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
>
<
Text
>
Layar Ekosistem Sudah Bergabung
</
Text
>
<
Text
onPress
=
{
()
=>
Alert
.
alert
(
toFetch
)
}
>
Layar Rekomendasi Ekosistem
</
Text
>
</
View
>
</
View
>
);
...
...
@@ -22,4 +29,4 @@ const styles = StyleSheet.create({
},
});
export
default
Join
edEcosystemScreen
;
export
default
Recommend
edEcosystemScreen
;
src/screens/ecosystem/index.ts
View file @
36453194
...
...
@@ -3,6 +3,7 @@ import BusinessListScreen from "./BusinessListScreen";
import
EcosystemDetailScreen
from
"
./EcosystemDetailScreen
"
;
import
EcosystemListScreen
from
"
./EcosystemListScreen
"
;
import
EcosystemMapScreen
from
"
./EcosystemMapScreen
"
;
import
RecommendedEcosystemScreen
from
"
./RecommendedEcosystemScreen
"
;
export
{
BusinessCategoryScreen
,
...
...
@@ -10,4 +11,5 @@ export {
EcosystemDetailScreen
,
EcosystemListScreen
,
EcosystemMapScreen
,
RecommendedEcosystemScreen
,
};
src/screens/ecosystem/recomendation/LatestEcosystemScreen.tsx
deleted
100644 → 0
View file @
4e700b18
import
*
as
React
from
"
react
"
;
import
{
StyleSheet
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../../components/Themed
"
;
import
Colors
from
"
../../../constants/Colors
"
;
const
LatestEcosystemScreen
=
()
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
>
<
Text
>
Layar Ekosistem Terbaru
</
Text
>
</
View
>
</
View
>
);
};
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
Colors
.
background
,
paddingHorizontal
:
24
,
justifyContent
:
"
center
"
,
},
});
export
default
LatestEcosystemScreen
;
src/screens/ecosystem/recomendation/MyEcosystemScreen.tsx
deleted
100644 → 0
View file @
4e700b18
import
*
as
React
from
"
react
"
;
import
{
StyleSheet
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../../components/Themed
"
;
import
Colors
from
"
../../../constants/Colors
"
;
const
MyEcosystemScreen
=
()
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
>
<
Text
>
Layar Ekosistem Saya
</
Text
>
</
View
>
</
View
>
);
};
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
Colors
.
background
,
paddingHorizontal
:
24
,
justifyContent
:
"
center
"
,
},
});
export
default
MyEcosystemScreen
;
src/screens/ecosystem/recomendation/PopularEcosystemScreen.tsx
deleted
100644 → 0
View file @
4e700b18
import
*
as
React
from
"
react
"
;
import
{
StyleSheet
}
from
"
react-native
"
;
import
{
Text
,
View
}
from
"
../../../components/Themed
"
;
import
Colors
from
"
../../../constants/Colors
"
;
const
PopularEcosystemScreen
=
()
=>
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
>
<
Text
>
Layar Ekosistem Populer
</
Text
>
</
View
>
</
View
>
);
};
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
Colors
.
background
,
paddingHorizontal
:
24
,
justifyContent
:
"
center
"
,
},
});
export
default
PopularEcosystemScreen
;
src/screens/ecosystem/recomendation/index.ts
deleted
100644 → 0
View file @
4e700b18
import
JoinedEcosystemScreen
from
"
./JoinedEcosystemScreen
"
;
import
MyEcosystemScreen
from
"
./MyEcosystemScreen
"
;
import
PopularEcosystemScreen
from
"
./PopularEcosystemScreen
"
;
import
LatestEcosystemScreen
from
"
./LatestEcosystemScreen
"
;
export
{
PopularEcosystemScreen
,
JoinedEcosystemScreen
,
MyEcosystemScreen
,
LatestEcosystemScreen
,
};
src/types/navigation/EcosystemStack.ts
View file @
36453194
...
...
@@ -6,16 +6,13 @@ import { NativeStackScreenProps } from "@react-navigation/native-stack";
export
type
EcosystemStackParamList
=
{
BusinessEcosystem
:
undefined
;
Joined
:
undefined
;
Popular
:
undefined
;
Latest
:
undefined
;
MyEcosystem
:
undefined
;
CreateEcosystem
:
undefined
;
BusinessCategory
:
undefined
;
EcosystemList
:
{
headerTitle
:
string
};
EcosystemMap
:
undefined
;
BusinessList
:
{
headerTitle
:
string
};
EcosystemDetails
:
{
headerTitle
:
string
};
Recommended
:
{
headerTitle
:
string
;
toFetch
:
string
};
};
export
type
EcosystemStackScreenProps
<
...
...
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