import React, {useState} from "react"; import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom"; import Button from '@material-ui/core/Button'; import TemporaryDrawer from "./components/TemporaryDrawer"; import NavBar from "./components/NavBar"; import ExtensionCard from "./components/ExtensionCard"; export default function App() { return ( {/**/} ); } function Extensions() { let mapped; let [extensions, setExtensions] = useState([]) if (extensions.length === 0) { mapped =

wait

; fetch("http://127.0.0.1:4567/api/v1/extensions") .then(response => response.json()) .then(data => setExtensions(data)); } else { mapped = extensions.map(it => ); } return

{mapped}

; } function Home() { return ( ) } function Users() { return

Users

; }