From 901af4508f07ca5036ac44129bd72ca115227625 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 20 Oct 2023 17:03:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20active=20field=20from?= =?UTF-8?q?=20Ticker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ticker.test.tsx | 1 - src/Ticker.tsx | 6 +----- src/components/useTicker.tsx | 5 +---- src/lib/types.ts | 1 - 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Ticker.test.tsx b/src/Ticker.test.tsx index b97c69a..f7a40ba 100644 --- a/src/Ticker.test.tsx +++ b/src/Ticker.test.tsx @@ -19,7 +19,6 @@ describe('Ticker', function () { } as Settings const ticker = { id: '1', - active: true, createdAt: new Date(), title: 'Ticker Title', description: 'Ticker Description', diff --git a/src/Ticker.tsx b/src/Ticker.tsx index 862957d..ed11763 100644 --- a/src/Ticker.tsx +++ b/src/Ticker.tsx @@ -32,15 +32,11 @@ const Ticker: FC = () => { return } - if (ticker?.active) { - return - } - if (ticker === null && settings?.inactiveSettings !== undefined) { return } - return
...
+ return } export default Ticker diff --git a/src/components/useTicker.tsx b/src/components/useTicker.tsx index 1c22a13..522639f 100644 --- a/src/components/useTicker.tsx +++ b/src/components/useTicker.tsx @@ -27,10 +27,7 @@ export function TickerProvider({ children }: { children: ReactNode }): JSX.Eleme setSettings(response.data.settings) } - if (response.data.ticker?.active) { - setTicker(response.data.ticker) - } - + setTicker(response.data.ticker) setIsLoading(false) }) .catch(error => { diff --git a/src/lib/types.ts b/src/lib/types.ts index e310c4a..5973617 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1,5 +1,4 @@ export type Ticker = { - active: boolean createdAt: Date description: string domain: string