|
1 | 1 | /* global google */
|
2 |
| -import React, { Component } from 'react'; |
| 2 | +import React, { Component } from "react"; |
3 | 3 |
|
4 |
| -import './About.css'; |
| 4 | +import "./About.css"; |
5 | 5 |
|
6 | 6 | export default class About extends Component {
|
7 |
| - componentDidMount() { |
8 |
| - let mapOptions = { |
9 |
| - zoom: 2, |
10 |
| - scrollwheel: false, |
11 |
| - center: new google.maps.LatLng(32.937960, -1.453884) |
12 |
| - }; |
13 |
| - let map = new google.maps.Map(this.refs.mapCanvas, mapOptions); |
| 7 | + componentDidMount() { |
| 8 | + let mapOptions = { |
| 9 | + zoom: 2, |
| 10 | + scrollwheel: false, |
| 11 | + center: new google.maps.LatLng(32.93796, -1.453884) |
| 12 | + }; |
| 13 | + let map = new google.maps.Map(this.refs.mapCanvas, mapOptions); |
14 | 14 |
|
15 |
| - fetch('/api/location', { headers: new Headers({ accept: 'application/json' }) }) |
16 |
| - .then(resp => resp.json()) |
17 |
| - .then(places => { |
18 |
| - for (let place of places) { |
19 |
| - new google.maps.Marker({ |
20 |
| - position: place, |
21 |
| - map: map, |
22 |
| - title: place.name |
23 |
| - }); |
24 |
| - } |
25 |
| - }); |
| 15 | + fetch("/api/location", { |
| 16 | + headers: new Headers({ accept: "application/json" }) |
| 17 | + }) |
| 18 | + .then(resp => resp.json()) |
| 19 | + .then(places => { |
| 20 | + for (let place of places) { |
| 21 | + new google.maps.Marker({ |
| 22 | + position: place, |
| 23 | + map: map, |
| 24 | + title: place.name |
| 25 | + }); |
| 26 | + } |
| 27 | + }); |
26 | 28 |
|
27 |
| - setInterval(() => { |
28 |
| - document.getElementById('framed').src = 'https://framed.joshchorlton.com/api/photo/dd91d6?' + new Date().getTime() |
29 |
| - }, 10000); |
30 |
| - } |
| 29 | + setInterval(() => { |
| 30 | + document.getElementById("framed").src = |
| 31 | + "https://framed.joshchorlton.com/api/photo/dd91d6?" + |
| 32 | + new Date().getTime(); |
| 33 | + }, 10000); |
| 34 | + } |
31 | 35 |
|
32 |
| - render() { |
33 |
| - return ( |
34 |
| - <div id="about" className="noPrint"> |
35 |
| - <div id="aboutContent"> |
36 |
| - <h1 className="sectionHeading"> |
37 |
| - About Me |
38 |
| - </h1> |
39 |
| - <p> |
40 |
| - I'm currently employed as a Software Engineer at Stripe. I studied at the University of Waterloo in Canada. I've been around the world for school, work and pleasure. |
41 |
| - </p> |
42 |
| - <p> |
43 |
| - I grew up in Toronto, Ontario where I completed elementary and high school. Growing up, I was an avid hockey fan. I particularly enjoy playing outdoor games in the winter. |
44 |
| - </p> |
45 |
| - <p> |
46 |
| - I also love to travel. I've been to a few different continents and met some really cool people along the way. My travels have brought me on trips ranging from African safari to remote villages in Vietnam to beach parties in the Philippines. Check out the places I've been to on the map. |
47 |
| - </p> |
48 |
| - <div id="map" ref="mapCanvas"></div> |
49 |
| - <p> |
50 |
| - Here are some of my favourite photos from these trips: |
51 |
| - </p> |
52 |
| - <img id="framed" src="https://framed.joshchorlton.com/api/photo/93b34e" alt="Travel" /> |
53 |
| - </div> |
54 |
| - </div> |
55 |
| - ); |
56 |
| - } |
| 36 | + render() { |
| 37 | + return ( |
| 38 | + <div id="about" className="noPrint"> |
| 39 | + <div id="aboutContent"> |
| 40 | + <h1 className="sectionHeading">About Me</h1> |
| 41 | + <p> |
| 42 | + I'm currently employed as a Software Engineer at Stripe. I studied |
| 43 | + at the University of Waterloo in Canada. I've been around the world |
| 44 | + for school, work and pleasure. |
| 45 | + </p> |
| 46 | + <p> |
| 47 | + I grew up in Toronto, Ontario where I completed elementary and high |
| 48 | + school. Growing up, I was an avid hockey fan. I particularly enjoy |
| 49 | + playing outdoor games in the winter. |
| 50 | + </p> |
| 51 | + <p> |
| 52 | + I also love to travel. I've been to a few different continents and |
| 53 | + met some really cool people along the way. My travels have brought |
| 54 | + me on trips ranging from African safari to remote villages in |
| 55 | + Vietnam to beach parties in the Philippines. Check out the places |
| 56 | + I've been to on the map. |
| 57 | + </p> |
| 58 | + <div id="map" ref="mapCanvas" /> |
| 59 | + <p>Here are some of my favourite photos from these trips:</p> |
| 60 | + <img |
| 61 | + id="framed" |
| 62 | + src="https://framed.joshchorlton.com/api/photo/93b34e" |
| 63 | + alt="Travel" |
| 64 | + /> |
| 65 | + </div> |
| 66 | + </div> |
| 67 | + ); |
| 68 | + } |
57 | 69 | }
|
58 |
| - |
|
0 commit comments