From dacfddb3c686928ee45b0726c34b7f99e966170d Mon Sep 17 00:00:00 2001 From: rizkyalviandra Date: Tue, 12 Feb 2019 18:51:40 +0700 Subject: [PATCH 1/3] event detail pages --- src/pages/main/CommunityList/.index.tsx.swp | Bin 0 -> 12288 bytes src/pages/main/CreateEvent/index.tsx | 10 ++- src/pages/main/EventDetail/index.tsx | 66 +++++++++++++++----- src/routes/main/index.tsx | 2 + 4 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 src/pages/main/CommunityList/.index.tsx.swp diff --git a/src/pages/main/CommunityList/.index.tsx.swp b/src/pages/main/CommunityList/.index.tsx.swp new file mode 100644 index 0000000000000000000000000000000000000000..d34b54c1afa28422404e6579bb72f9d75ad020ca GIT binary patch literal 12288 zcmeI2O>Epm6vwAXrIfaS=n)CMm;*`cuJh4Ku-XkDNh3vSo3tB(s#2j@?`+n@_E`38 zl4Z3})E>BS;0BjUoRBzi;lKq%sl&Mi~>dhqkvJsC}0#Y3K#{90!9I&fKk9G@IO?5w;22FFk_dG zzSspMsm<9dH8#-~y-s8=M9|pJ41`@GiIoZh~EK z5jfy9I0cS@-;Xo)EBFO`2kwH~AOYvVpT`*c9((~l0++!Ou)uNf&!dd}0e%FZfm>h& zJP#`1@1tk~UxEN|a0xsO4ugA-F!n9@1iS}sfE`c=Q{W^x0gi$r;9+nNdi?;t0e8Sx z;5K+4B;YF809w~|U@oJ8QNSo*6nMZD7|bxDfsG$T-1oM^RV9L?N|uX?HxXM|%NyN9 zdF|ek#Jf;Uwzhq-SEV`K)k})nxAQ@ydYhiu)uT`qC*msg8Tt%oD~)o?J@AkyN>tAm z3Dv2gZyFsTRK-R8of6Y9GSFrKk#=8SHAhdi$kK=Oc|&&H4sZHmE#fX}@kVXvy&?97 zbJY8Na-}cfoweKXl(1+pSZwTi%I(w~-ETB-bcgA)`SbajGH!|Z3U7H`sCO=tEpJSP zZ3w?Tsa)QnDV35zmF8#12SzgSlqW-sT#rSP)ceyjR3GVDn_RWRp}up9HrAHcs&qvJa!1f^M}*WCSSD(5#o-Zo zLF5ZvswrA@${8)t%;=WL8O^4h*%rO?dn!g@r;Opv>&Sq>rnF{LdzRf*lx(ONI!}+8 zB8mlyJ7c|PhLKRM*Z}%1W-HH4sjKz=HEYhY$(q+c7Od;#F0~b(D_u8QL_R}Rnl7I9 zr@D@!=DgfR3Wejb5iO-#hBy^ol?)M0b{}6AO4l=rWt3DxzT<77@>PcUt(dk7quDgp zgg8X17m2zR#a_VUo;5agEpvGM-K%;7Hn3mC&X#&VJ7P+i+S`9*4Mqy}56moM18aJ|kCss+t zU6Gw5xlzbhrEAxTC-hPr^ImOrDKBDP)IAfut8pBcyi=a?1x_X`N?ha@?4$>a?vJQO zX|opTvx!Vn#>LMJrrW1(0NMZ$BqRqR$BG>0hQrJ&RstKnuHeUKR3%$0w zuG7?}RTx!bQTwTP)%}8RO6dz8qIE3zePJ_Ce*?C4GGdt3%L9JH~;_u literal 0 HcmV?d00001 diff --git a/src/pages/main/CreateEvent/index.tsx b/src/pages/main/CreateEvent/index.tsx index 22981be..636dd0a 100644 --- a/src/pages/main/CreateEvent/index.tsx +++ b/src/pages/main/CreateEvent/index.tsx @@ -1,9 +1,13 @@ import React, { Component } from "react" import { WingBlank, Button } from "@ant-design/react-native" import InputItem from "../../../components/InputItem" -import { NavigationStackScreenOptions } from "react-navigation" +import { NavigationStackScreenOptions, NavigationScreenProp } from "react-navigation" -export default class CreateEvent extends Component { +interface IProps { + navigation: NavigationScreenProp +} + +export default class CreateEvent extends Component { public static navigationOptions: NavigationStackScreenOptions = { title: "Create Event", } @@ -23,7 +27,7 @@ export default class CreateEvent extends Component { placeholder="enter event description" /> - + ) } diff --git a/src/pages/main/EventDetail/index.tsx b/src/pages/main/EventDetail/index.tsx index b0670b8..0124d9c 100644 --- a/src/pages/main/EventDetail/index.tsx +++ b/src/pages/main/EventDetail/index.tsx @@ -1,7 +1,7 @@ import React, { Component } from "react"; -import { Text, View, StyleSheet, TouchableOpacity } from "react-native"; +import { Text, View, StyleSheet,ImageBackground } from "react-native"; import { Button } from "@ant-design/react-native"; -import { NavigationScreenProp } from "react-navigation"; +import { NavigationScreenProp, NavigationStackScreenOptions } from "react-navigation"; import constants from "../../../config/constants"; interface IProps { @@ -9,6 +9,9 @@ interface IProps { } export default class EventDetail extends Component { + public static navigationOptions: NavigationStackScreenOptions = { + title: "Create Event", + } state = { absent: false, attend: false @@ -17,14 +20,18 @@ export default class EventDetail extends Component { render() { return ( - - Event Name - Event Date - Event Location - - Organized by : Facebook Developer Circle Malang - - + {/* */} + + + Event Name + Event Date + Event Location + + Organized by : Facebook Developer Circle Malang + + + {/* */} + {/* */} { style={{ width: constants.DEVICE_WIDTH * 0.6, alignSelf: "center", - marginTop: 20 + marginTop: 20, }} - type="ghost" + type="primary" onPress={() => this.setState({ attend: !this.state.attend })} > Check In - this.setState({ absent: !this.state.absent })} + > + Absent + + + {/* this.setState({ absent: !this.state.absent })} style={{ color: "gray", alignSelf: "center", top: 50 }} > Absent - + */} ); @@ -71,8 +91,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, @@ -84,5 +113,10 @@ const styles = StyleSheet.create({ flex: 1, flexDirection: "column", justifyContent: "space-between" - } + }, + image: { + width: constants.DEVICE_WIDTH * 0.95, + height: 200, + opacity: 0.5, + }, }); diff --git a/src/routes/main/index.tsx b/src/routes/main/index.tsx index 4a555a5..6a7cc43 100644 --- a/src/routes/main/index.tsx +++ b/src/routes/main/index.tsx @@ -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, }) From acfa987eb9bcc3b3bb615aa4392e62c92efd369f Mon Sep 17 00:00:00 2001 From: rizkyalviandra Date: Mon, 25 Feb 2019 13:06:53 +0700 Subject: [PATCH 2/3] clean code styling --- src/pages/main/EventDetail/index.tsx | 55 ++++++++++++++++++---------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/src/pages/main/EventDetail/index.tsx b/src/pages/main/EventDetail/index.tsx index 0124d9c..787c4b2 100644 --- a/src/pages/main/EventDetail/index.tsx +++ b/src/pages/main/EventDetail/index.tsx @@ -23,10 +23,10 @@ export default class EventDetail extends Component { {/* */} - Event Name - Event Date - Event Location - + Event Name + Event Date + Event Location + Organized by : Facebook Developer Circle Malang @@ -35,11 +35,7 @@ export default class EventDetail extends Component { Event Description: @@ -48,13 +44,9 @@ export default class EventDetail extends Component { quis. Maecenas fringilla orci at lacinia luctus. - +