Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event detail pages #31

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/pages/main/CommunityList/.index.tsx.swp
Binary file not shown.
6 changes: 5 additions & 1 deletion src/pages/main/CreateEvent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import ImagePicker from "../../../components/ImagePicker"
import { NavigationStackScreenOptions } from "react-navigation"
import { StyleSheet, ScrollView } from "react-native"

export default class CreateEvent extends Component {
interface IProps {
navigation: NavigationScreenProp<any, any>
}

export default class CreateEvent extends Component<IProps> {
public static navigationOptions: NavigationStackScreenOptions = {
title: "Create Event",
}
Expand Down
100 changes: 73 additions & 27 deletions src/pages/main/EventDetail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React, { Component } from "react";
import { Text, View, StyleSheet, TouchableOpacity } from "react-native";
import { Button } from "@ant-design/react-native";
import { NavigationScreenProp } from "react-navigation";
import { Text, View, StyleSheet,ImageBackground } from "react-native";
import { Button, WhiteSpace } from "@ant-design/react-native";
import { NavigationScreenProp, NavigationStackScreenOptions } from "react-navigation";
import constants from "../../../config/constants";

interface IProps {
navigation: NavigationScreenProp<any, any>;
}

export default class EventDetail extends Component<IProps> {
public static navigationOptions: NavigationStackScreenOptions = {
title: "Create Event",
}
state = {
absent: false,
attend: false
Expand All @@ -17,22 +20,22 @@ export default class EventDetail extends Component<IProps> {
render() {
return (
<View style={styles.container}>
<View style={styles.bannerContainer}>
<Text style={{ fontSize: 30 }}>Event Name</Text>
<Text style={{ fontSize: 20, color: "white" }}>Event Date</Text>
<Text style={{ fontSize: 15, color: "white" }}>Event Location</Text>
<Text style={{ marginTop: 20 }}>
Organized by : Facebook Developer Circle Malang
</Text>
</View>
{/* <View style={styles.bannerContainer}> */}
<ImageBackground source={require('../../../../assets/FB.jpg')} resizeMode={"cover"} style={styles.bannerContainer} />
<View style={styles.text}>
<Text style={styles.textEventName}>Event Name</Text>
<Text style={styles.textEventDate}>Event Date</Text>
<Text style={styles.textEventLocation}>Event Location</Text>
<Text style={styles.textOrganized}>
Organized by : Facebook Developer Circle Malang
</Text>
</View>
{/* </ImageBackground> */}
{/* </View> */}

<View style={styles.content}>
<View
style={{
width: constants.DEVICE_WIDTH * 0.8,
alignSelf: "center",
top: 20
}}
style={styles.eventContent}
>
<Text>Event Description:</Text>
<Text>
Expand All @@ -41,24 +44,29 @@ export default class EventDetail extends Component<IProps> {
quis. Maecenas fringilla orci at lacinia luctus.
</Text>
</View>
<View style={{ margin: 30 }} />
<WhiteSpace />
<Button
style={{
width: constants.DEVICE_WIDTH * 0.6,
alignSelf: "center",
marginTop: 20
}}
type="ghost"
style={styles.btnChecked}
type="primary"
onPress={() => this.setState({ attend: !this.state.attend })}
>
Check In
</Button>
<Text

<Button
style={styles.btnChecked}
type="ghost"
onPress={() => this.setState({ absent: !this.state.absent })}
>
Absent
</Button>

{/* <Text
onPress={() => this.setState({ absent: !this.state.absent })}
style={{ color: "gray", alignSelf: "center", top: 50 }}
>
Absent
</Text>
</Text> */}
</View>
</View>
);
Expand All @@ -71,8 +79,17 @@ const styles = StyleSheet.create({
alignItems: "center",
justifyContent: "center",
width: constants.DEVICE_WIDTH,
// height: constants.DEVICE_HEIGHT,
height: 300,
opacity: 0.5,
//backgroundColor: "skyblue",
},
text: {
flex: 1,
alignItems: "center",
justifyContent: 'center',
width: constants.DEVICE_WIDTH,
height: constants.DEVICE_HEIGHT,
backgroundColor: "skyblue"
},
content: {
width: constants.DEVICE_WIDTH,
Expand All @@ -84,5 +101,34 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: "column",
justifyContent: "space-between"
}
},
image: {
width: constants.DEVICE_WIDTH * 0.95,
height: 200,
opacity: 0.5,
},
textEventName: {
fontSize: 30,
},
textEventDate: {
fontSize: 20,
color: "black",
},
textEventLocation: {
fontSize: 15,
color: "black",
},
textOrganized: {
marginTop: 20,
},
eventContent: {
width: constants.DEVICE_WIDTH * 0.8,
alignSelf: "center",
top: 20,
},
btnChecked: {
width: constants.DEVICE_WIDTH * 0.6,
alignSelf: "center",
marginTop: 20,
},
});
2 changes: 2 additions & 0 deletions src/routes/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import CommunityCreate from "../../pages/main/CommunityCreate"
import CommunityList from "../../pages/main/CommunityList"
import DetailCommunity from "../../pages/main/DetailCommunity"
import CreateEvent from "../../pages/main/CreateEvent"
import EventDetail from "../../pages/main/EventDetail"

export default createStackNavigator({
CommunityList,
CommunityCreate,
DetailCommunity,
CreateEvent,
EventDetail,
})