From 2c8b0e1aaf3a71e432e2b86799c22f83857d1cfe Mon Sep 17 00:00:00 2001 From: Igor Carvalho Date: Wed, 19 Jul 2023 17:27:09 -0300 Subject: [PATCH] refactor[darkContext]: Move type darkContextType to types directorie --- src/frontend/src/contexts/darkContext.tsx | 6 +----- src/frontend/src/types/typesContext/index.ts | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/frontend/src/contexts/darkContext.tsx b/src/frontend/src/contexts/darkContext.tsx index 2a76d0e53..d152ced34 100644 --- a/src/frontend/src/contexts/darkContext.tsx +++ b/src/frontend/src/contexts/darkContext.tsx @@ -1,9 +1,5 @@ import { createContext, useEffect, useState } from "react"; - -type darkContextType = { - dark: {}; - setDark: (newState: {}) => void; -}; +import { darkContextType } from "../types/typesContext"; const initialValue = { dark: {}, diff --git a/src/frontend/src/types/typesContext/index.ts b/src/frontend/src/types/typesContext/index.ts index 984dda332..f0debe77a 100644 --- a/src/frontend/src/types/typesContext/index.ts +++ b/src/frontend/src/types/typesContext/index.ts @@ -38,3 +38,8 @@ export type alertContextType = { clearNotificationList: () => void; removeFromNotificationList: (index: string) => void; }; + +export type darkContextType = { + dark: {}; + setDark: (newState: {}) => void; +};