From bc880295c4f9251e2dbd22b66dd1d2d910bd7d03 Mon Sep 17 00:00:00 2001 From: M1000fr Date: Fri, 13 Dec 2024 18:39:49 +0100 Subject: [PATCH] Refactor: Simplify conditional rendering in FetchApi component --- src/app/components/FetchApi.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/components/FetchApi.tsx b/src/app/components/FetchApi.tsx index 733d777..73b5f41 100644 --- a/src/app/components/FetchApi.tsx +++ b/src/app/components/FetchApi.tsx @@ -21,15 +21,11 @@ export const FetchApi = () => { > Fetch API -
- {date ? ( -

Server time: {date}

- ) : ( -

- Click the button to fetch the API -

- )} -
+ {date ? ( +

Server time: {date}

+ ) : ( +

Click the button to fetch the API

+ )} ); };