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
$ npm i --package-lock-only |
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 { | |
background-color: blue; | |
} |
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, { Component } from 'react' | |
import { getUsers } from '../services/api' | |
class Users extends Component { | |
state = { | |
loading: false | |
} | |
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, { Component } from 'react' | |
import { getDepartments } from '../services/api' | |
class Departments extends Component { | |
state = { | |
loading: false | |
} | |
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, { Component, Fragment } from 'react' | |
import Departments from './components/Departments' | |
import Users from './components/Users' | |
import Loading from './components/Loading' | |
import './index.css' | |
const LoadingContext = React.createContext({ | |
loading: false, |
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, { Component, Fragment } from 'react' | |
import Departments from './components/Departments' | |
import Users from './components/Users' | |
import './index.css' | |
const LoadingContext = React.createContext({ | |
loading: false, | |
message: 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, { Component, Fragment } from 'react' | |
import Loading from './Loading' | |
import { getDepartments } from '../services/api' | |
class Departments extends Component { | |
state = { | |
loading: false |
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, { Component, Fragment } from 'react' | |
import Loading from './Loading' | |
import { getUsers } from '../services/api' | |
class Users extends Component { | |
state = { | |
loading: false |
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 Spinner from 'react-spinkit' | |
const Loading = ({ loading, message }) => { | |
return loading ? ( | |
<div className='overlay-content'> | |
<div className='wrapper'> | |
<Spinner | |
name='pacman' |
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
.overlay-content { | |
display: flex; | |
width: 100%; | |
left: 0; | |
top: 0; | |
align-items: center; | |
height: 100%; | |
justify-content: center; | |
position: fixed; | |
z-index: 999999; |