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, { useEffect, useRef } from "react"; | |
import { withRouter } from 'react-router-dom'; | |
function usePrevious(value) { | |
const ref = useRef(); | |
useEffect(() => { | |
ref.current = value; |
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
// Psuedo Code | |
const stores = [...] | |
let storesNotInFirebase = [] | |
let timeoutID = TimeOut | |
stores.forEach(store => { | |
getFromFirebase(store).then(() => | |
if(not_in_firebase) addToNotInFirebaseList(store) |
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, { useEffect, useState, useCallback } from "react"; | |
import zenscroll from 'zenscroll'; | |
import "./ScrollCircles.css"; | |
const ScrollCircles = () => { | |
const [selectedCircle, setSelectedCircle] = useState("inspiration"); | |
const [isMobile, setIsMobile] = useState(false); | |
let isScrolling = 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
import React, { useRef, useEffect, useState } from 'react'; | |
import './App.css'; | |
import GoogleMap from './components/google-map/GoogleMap'; | |
import Header from './components/header/header'; | |
import MapContainer from './components/map-container/MapContainer'; | |
import Sidebar from './components/sidebar/Sidebar'; | |
import HomeContainer from './components/home-container/HomeContainer'; | |
import firebase, {initFirebase} from "./components/firebase/firebase.js"; | |
const App = () => { |
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 firebase from "firebase"; | |
const initFirebase = () => { | |
const firebaseConfig = { | |
apiKey: process.env.REACT_APP_API_KEY, | |
authDomain: process.env.REACT_APP_AUTH_DOMAIN, | |
databaseURL: process.env.REACT_APP_DATABASE_URL, | |
projectId: process.env.REACT_APP_PROJECT_ID, | |
storageBucket: process.env.REACT_APP_STORAGE_BUCKET, | |
messagingSenderId: process.env.REACT_APP_MESSAGING_SENDER_ID, |
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, { useState, useEffect, useRef } from "react"; | |
import FileSaver from "file-saver"; | |
import qs from "qs"; | |
const SearchContext = React.createContext({ | |
setFormData: () => {}, | |
formData: {}, | |
setSearchIsLoading: () => {}, | |
searchIsLoading: false, | |
setTableData: () => {}, |
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, { useState, useEffect, useRef } from "react"; | |
import FileSaver from "file-saver"; | |
import qs from "qs"; | |
const SearchContext = React.createContext({ | |
setFormData: () => {}, | |
formData: {}, | |
setSearchIsLoading: () => {}, | |
searchIsLoading: false, | |
setTableData: () => {}, |
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, { useState, useEffect } from "react"; | |
import styles from "./dropdown.module.scss"; | |
const Dropdown = ({ children, title, ...rest }) => { | |
const focusStyle = styles.dropdown__focus; | |
const [focusClass, setFocusClass] = useState(""); | |
const [focus, setFocus] = useState(false); | |
useEffect(() => { | |
if(focus) { |
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, { useState, useEffect } from "react"; | |
import styles from "./dropdown.module.scss"; | |
const Dropdown = ({ children, title, ...rest }) => { | |
const focusStyle = styles.dropdown__focus; | |
const [focusClass, setFocusClass] = useState(""); | |
const [focus, setFocus] = useState(false); | |
useEffect(() => { | |
if(focus) { |
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, { useState, useEffect, useRef } from "react"; | |
import styles from "./industry-tree.module.scss"; | |
const IndustryTreeGroup = ({ group = {}, onChange = () => {}, industryTitle = "" }) => { | |
const [checked, setChecked] = useState([]); | |
const [collapsed, setCollapsed] = useState(true); | |
const indeterminateCheckbox = useRef(null); | |
const toggleAll = event => { | |
if (event.target.checked) { |
OlderNewer