From f9cd68181137c72e92c6951efd9b8d29c4b73bc1 Mon Sep 17 00:00:00 2001
From: Tom van der Lee <tom@vanderlee.io>
Date: Tue, 25 Jan 2022 21:42:51 +0100
Subject: Added dark mode

---
 src/hooks/useRequests.tsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/hooks/useRequests.tsx')

diff --git a/src/hooks/useRequests.tsx b/src/hooks/useRequests.tsx
index 5ac70a4..cb85162 100644
--- a/src/hooks/useRequests.tsx
+++ b/src/hooks/useRequests.tsx
@@ -57,6 +57,7 @@ export interface useRequestsProps {
 export interface UseRequests {
   calls: RequestResponse[]
   readyState: ReadyState
+  clear: () => void
 }
 
 export default function useRequests({ onConnect }: useRequestsProps): UseRequests {
@@ -124,5 +125,9 @@ export default function useRequests({ onConnect }: useRequestsProps): UseRequest
       response: responses.find(({id}) => id === request.id)
     })), [requests, responses]),
     readyState,
+    clear: () => {
+      setRequests([])
+      setResponses([])
+    }
   }
 }
-- 
cgit v1.2.3

