From f69a7786da3ba21373574ee6c96371769a72ac42 Mon Sep 17 00:00:00 2001
From: Tom van der Lee <tom@vanderlee.io>
Date: Tue, 25 Jan 2022 22:03:00 +0100
Subject: Fixed issue with json viewer

---
 src/components/App/App.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/components/App/App.tsx')

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 @@
 import * as React from "react";
-import {ReactElement, useEffect, useMemo, useState} from "react";
+import {ReactElement, useContext, useEffect, useMemo, useState} from "react";
 import useRequests, {
   ReadyState,
   RequestResponse
@@ -16,6 +16,7 @@ import {Sliders} from "../Icons/Sliders";
 import {Sun} from "../Icons/Sun";
 import {Moon} from "../Icons/Moon";
 import Trash from "../Icons/Trash";
+import {DarkModeContext} from "../../contexts/DarkMode";
 
 interface Config {
   url: string
@@ -49,7 +50,7 @@ const statusTextMap: ReadyStateMap = {
 }
 
 export default function App() {
-  const { darkMode, toggle } = useDarkMode();
+  const { darkMode, toggle } = useContext(DarkModeContext);
   const [config, setConfig]= useState<Config | null>(null)
 
   const { calls, readyState, clear } = useRequests({
-- 
cgit v1.2.3

