joygabriel21

Complete QTemu

Jan 21st, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import axios from 'axios';
  3. import NavbarQTemu from './components/organisms/NavbarQTemu';
  4. import Header from './components/organisms/Header';
  5. import NextMeetup from './components/organisms/NextMeetup';
  6. import AboutMeetup from './components/organisms/AboutMeetup';
  7. import Members from './components/organisms/Members';
  8. import PastMeetup from './components/organisms/PastMeetup';
  9. import Footer from './components/organisms/Footer';
  10. import "./App.css";
  11.  
  12.  
  13. export default class App extends Component {
  14.  
  15. constructor() {
  16. super();
  17.  
  18. this.state = {
  19. meetup: {
  20. image: 'https://via.placeholder.com/500x500',
  21. title: 'Brainmatics Meetup',
  22. location: 'Jakarta, Indonesia',
  23. totalMembers: 1078,
  24. organizer: 'Adhy Wiranata',
  25. },
  26. invitation: {
  27. title: 'Awesome Meetup',
  28. date: new Date().toString(),
  29. greetings: 'Hello JavaScript & NodeJS Ninjas!',
  30. text: 'Get ready for our monthly meetup JakartaJS! This will be our fifth meetup of 2018! The meetup format will contain some short stories and technical talks. If you have a short announcement you\'d like to share with the audience,you may do so during open mic announcements. Remember to bring a photo ID to get through building security. ..... See you there! ',
  31. organizer: 'Best Hengki, Sofian - The JakartaJS Organizers'
  32. },
  33. profile: {
  34. twitter: '@JakartaJS',
  35. hashtag: '#jakartajs'
  36. },
  37. member: [
  38. {
  39. imageProfile: 'https://3ek9gx368g2n28ygtw3vknmg-wpengine.netdna-ssl.com/wp-content/uploads/sites/4/2015/10/placeholder-circle-1.png',
  40. name: 'Adhy Wiranata',
  41. memberType: 'Organizer'
  42. },
  43. {
  44. imageProfile: 'https://3ek9gx368g2n28ygtw3vknmg-wpengine.netdna-ssl.com/wp-content/uploads/sites/4/2015/10/placeholder-circle-1.png',
  45. name: 'Bobby Wiranata',
  46. memberType: 'Member'
  47. },
  48. {
  49. imageProfile: 'https://3ek9gx368g2n28ygtw3vknmg-wpengine.netdna-ssl.com/wp-content/uploads/sites/4/2015/10/placeholder-circle-1.png',
  50. name: 'Chandra Wiranata',
  51. memberType: 'Member'
  52. }
  53. ],
  54. schedule: [
  55. {
  56. id: 39,
  57. date: '27 November 2017',
  58. topic: 'JakartaJS with Kumparan',
  59. participants: 139
  60. },
  61. {
  62. id: 40,
  63. date: '27 September 2017',
  64. topic: 'JakartaJS with Blibli',
  65. participants: 239
  66. },
  67. {
  68. id: 41,
  69. date: '27 October 2017',
  70. topic: 'JakartaJS with Hacktiv8',
  71. participants: 39
  72. },
  73. {
  74. id: 39,
  75. date: '27 November 2017',
  76. topic: 'JakartaJS with Kumparan',
  77. participants: 139
  78. },
  79. {
  80. id: 40,
  81. date: '27 September 2017',
  82. topic: 'JakartaJS with Blibli',
  83. participants: 239
  84. },
  85. {
  86. id: 41,
  87. date: '27 October 2017',
  88. topic: 'JakartaJS with Hacktiv8',
  89. participants: 39
  90. }
  91. ],
  92. members: []
  93. };
  94. };
  95.  
  96. componentDidMount() {
  97. axios
  98. .get("https://randomuser.me/api/?results=10&gender=female")
  99. .then(response => {
  100. this.setState({
  101. members: response.data.results,
  102. })
  103. }
  104. );
  105. };
  106.  
  107. render() {
  108. return (
  109. <div>
  110. <NavbarQTemu/>
  111. <Header
  112. image = {this.state.meetup.image}
  113. title = {this.state.meetup.title}
  114. location = {this.state.meetup.location}
  115. totalMembers = {this.state.meetup.totalMembers}
  116. organizer = {this.state.meetup.organizer}
  117. />
  118. <NextMeetup
  119. title = {this.state.invitation.title}
  120. date = {this.state.invitation.date}
  121. greetings = {this.state.invitation.greetings}
  122. text = {this.state.invitation.text}
  123. organizer = {this.state.invitation.organizer}
  124. />
  125. <AboutMeetup
  126. twitter = {this.state.profile.twitter}
  127. hashtag = {this.state.profile.hashtag}
  128. />
  129. <Members
  130. members = {this.state.members}
  131. length = {this.state.member.length}
  132. />
  133. <PastMeetup
  134. schedule = {this.state.schedule}
  135. />
  136. <Footer/>
  137. </div>
  138. )
  139. }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment