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 { gql } from 'apollo-boost'; | |
/* PRODUCTS */ | |
export const GET_PRODUCTS_QUERY = gql` | |
query { | |
products { | |
skuId | |
name | |
description | |
price |
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 { GraphQLServer } = require('graphql-yoga'); | |
const typeDefs = ` | |
type Query { | |
name: String! | |
age: Int! | |
isSingle: Boolean | |
} | |
`; |
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
readme.md |
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
[ | |
{ | |
"id": "3c438a51-4c3e-49ee-bdd8-daaa93859c7c", | |
"type": "Full Time", | |
"url": "https://jobs.github.com/positions/3c438a51-4c3e-49ee-bdd8-daaa93859c7c", | |
"created_at": "Tue Jun 23 20:21:56 UTC 2020", | |
"company": "Connected Health Solutions BV", | |
"company_url": "http://www.carexs.com", | |
"location": "Amsterdam", | |
"title": "Lead Service Reliability Engineer ", |
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
$body-color: #949ca5; | |
$default-padding: 2rem; | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
html { |
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 { useState } from 'react'; | |
import loading from '../images/loading.png'; | |
/* https://via.placeholder.com/100x100?text=Loading */ | |
const Image = ({ src, alt, ...props }) => { | |
const [isVisible, setIsVisible] = useState(false); | |
const changeVisibility = () => { | |
setIsVisible(true); |
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 { useEffect, useState } from 'react'; | |
const useObserver = (targetRef) => { | |
const [isVisible, setIsVisible] = useState(false); | |
useEffect(() => { | |
const observer = new IntersectionObserver((entries, observer) => { | |
entries.forEach((entry) => { | |
if (entry.isIntersecting) { | |
if (!isVisible) { |
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 loadJobs = (selection) => { | |
const { dispatch } = props; | |
const { description, location, full_time, page = 1 } = selection; | |
let isLoadMore = false; | |
if (selection.hasOwnProperty('page')) { | |
isLoadMore = true; | |
} | |
dispatch(resetErrors()); | |
setIsLoading(true); | |
dispatch( |
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 { useState, useEffect } from 'react'; | |
import ReactDOM from 'react-dom'; | |
const Loader = (props) => { | |
const [node] = useState(document.createElement('div')); | |
const loader = document.querySelector('#loader'); | |
useEffect(() => { | |
loader.appendChild(node).classList.add('message'); | |
}, [loader, node]); |
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, { useContext } from 'react'; | |
import moment from 'moment'; | |
import JobsContext from '../context/jobs'; | |
const JobItem = (props) => { | |
const { onItemClick } = useContext(JobsContext); | |
const { | |
id, | |
type, | |
created_at, |