This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd existing_folder | |
git init | |
git remote add origin git@[YOUR_PROJECT_FOLDER].git | |
git add . | |
git commit -m "Initial commit" | |
git push -u origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { getMyLocation } from '../utilities'; | |
const withLocation = (WrappedComponent) => ( | |
class extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
accuracy: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getLocation = () => { | |
const options = { | |
enableHighAccuracy: true, | |
timeout: 5000, | |
maximumAge: 0, | |
}; | |
return new Promise((resolve, reject) => { | |
navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import validation from '../../utilities/validation/parallax'; | |
const Parallax = (props) => { | |
const { | |
alpha, | |
blue, | |
children, | |
green, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const validation = { | |
default: { | |
color: 255, | |
alpha: 0.4, | |
}, | |
color(color) { | |
let validColor = this.default.color; | |
if (!Number.isNaN(color)) { | |
if (color < 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import Load from 'external-load'; | |
import Loadable from 'react-loadable'; | |
import CircularProgress from '@material-ui/core/CircularProgress'; | |
// Children | |
import Map from './map'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pin-label { | |
font-size: 0.7rem; | |
margin: 0; | |
position: relative; | |
top: -9px; | |
left: 2px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import MapGL, { Marker } from 'react-map-gl'; | |
import PinDropIcon from '@material-ui/icons/PinDrop'; | |
// Styles | |
import './map.css'; | |
const token = process.env.GATSBY_MAPBOX_API; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In your gatsby-config.js | |
require('dotenv').config({ | |
path: `.env.${process.env.NODE_ENV}`, | |
}); | |
module.exports = { | |
plugins: [ | |
{ | |
resolve: 'gatsby-source-mongodb', | |
options: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table style="width:100%" border="0"> | |
<thead> | |
<tr> | |
<th>Field Name</th> | |
<th>Data Type</th> | |
<th>Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> |
OlderNewer