Fakultas Ilmu Komputer UI

Commit 0c4a7503 authored by Abraham Rudolf Brahmana's avatar Abraham Rudolf Brahmana
Browse files

Merge branch 'integrate-forum' into 'master'

feat: add floating button for new forum post

See merge request !164
parents 95fa7610 2aef1714
Pipeline #88963 passed with stage
in 10 minutes and 11 seconds
......@@ -11,7 +11,7 @@ const CreateEcosystemStackNavigator = () => {
<ForumStack.Screen
name="AddForumPost"
component={AddForumPostScreen}
options={{ title: "" }}
options={({ route }) => ({ title: route.params.headerTitle })}
/>
<ForumStack.Screen
name="ForumPostDetail"
......
import * as React from "react";
import { StyleSheet, Image, Alert, ActivityIndicator } from "react-native";
import {
StyleSheet,
Image,
Alert,
ActivityIndicator,
TouchableOpacity,
} from "react-native";
import { Text, View } from "../../components/Themed";
import Colors from "../../constants/Colors";
import SmallButton from "../../components/button/SmallButton";
......@@ -189,6 +195,20 @@ const EcosystemDetailScreen = ({
color="#000000"
/>
</View>
<TouchableOpacity
style={styles.floatingTouchable}
onPress={() => {
nav.navigate("Forum", {
screen: "AddForumPost",
params: { headerTitle: title, id: id },
});
}}
>
<Image
source={require("../../../assets/images/plusButton.png")}
style={styles.floatingButton}
/>
</TouchableOpacity>
</View>
);
};
......@@ -239,6 +259,20 @@ const styles = StyleSheet.create({
marginTop: 4,
width: Layout.window.width * 0.9,
},
floatingTouchable: {
width: 60,
height: 60,
position: "absolute",
alignItems: "center",
justifyContent: "center",
right: 21,
bottom: 21,
},
floatingButton: {
resizeMode: "contain",
width: 72,
height: 72,
},
});
export default EcosystemDetailScreen;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment