This file contains hidden or 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 App = () => { | |
// state | |
const [authed, setAuthed] = useState(false); | |
const [token, setToken] = useState(null); | |
const [user, setUser] = useState(null); | |
// functions | |
const removeHash = () => { | |
window.history.pushState('', document.title, window.location.pathname); | |
}; |
This file contains hidden or 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 axios from 'axios'; | |
const userItemsBase = 'https://www.arcgis.com/sharing/rest/content/users'; | |
export const fetchUserContent = async (token, username) => { | |
const { data } = await axios.get(`${userItemsBase}/${username}`, { | |
params: { | |
token, | |
f: 'json', | |
}, |
This file contains hidden or 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
module.exports = { | |
extends: [ | |
'airbnb-typescript', | |
'airbnb/hooks', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:jest/recommended', | |
'plugin:prettier/recommended' | |
], | |
plugins: ['react', '@typescript-eslint', 'jest'], | |
env: { |
This file contains hidden or 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
name: CI | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-18.04 | |
strategy: | |
matrix: |
OlderNewer