summaryrefslogtreecommitdiffstats
path: root/src/components/App
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/App')
-rw-r--r--src/components/App/App.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx
index bbab612..3f50f22 100644
--- a/src/components/App/App.tsx
+++ b/src/components/App/App.tsx
@@ -1,5 +1,5 @@
1import * as React from "react"; 1import * as React from "react";
2import {ReactElement, useEffect, useMemo, useState} from "react"; 2import {ReactElement, useContext, useEffect, useMemo, useState} from "react";
3import useRequests, { 3import useRequests, {
4 ReadyState, 4 ReadyState,
5 RequestResponse 5 RequestResponse
@@ -16,6 +16,7 @@ import {Sliders} from "../Icons/Sliders";
16import {Sun} from "../Icons/Sun"; 16import {Sun} from "../Icons/Sun";
17import {Moon} from "../Icons/Moon"; 17import {Moon} from "../Icons/Moon";
18import Trash from "../Icons/Trash"; 18import Trash from "../Icons/Trash";
19import {DarkModeContext} from "../../contexts/DarkMode";
19 20
20interface Config { 21interface Config {
21 url: string 22 url: string
@@ -49,7 +50,7 @@ const statusTextMap: ReadyStateMap = {
49} 50}
50 51
51export default function App() { 52export default function App() {
52 const { darkMode, toggle } = useDarkMode(); 53 const { darkMode, toggle } = useContext(DarkModeContext);
53 const [config, setConfig]= useState<Config | null>(null) 54 const [config, setConfig]= useState<Config | null>(null)
54 55
55 const { calls, readyState, clear } = useRequests({ 56 const { calls, readyState, clear } = useRequests({