From c186c5929421a9ef5513c554c94d5b213125efdb Mon Sep 17 00:00:00 2001 From: Ankush Chauhan Date: Thu, 5 Sep 2024 12:54:36 +0530 Subject: [PATCH 1/2] introduced optional chaining to prevent errors --- apps/frontend/src/screens/Landing.tsx | 74 ++++++++++++++++----------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/apps/frontend/src/screens/Landing.tsx b/apps/frontend/src/screens/Landing.tsx index ff053aef..da3b03d2 100644 --- a/apps/frontend/src/screens/Landing.tsx +++ b/apps/frontend/src/screens/Landing.tsx @@ -5,48 +5,60 @@ import { THEMES_DATA } from '@/constants/themes'; export const Landing = () => { const { theme } = useThemeContext(); - const currentTheme = THEMES_DATA.find(data => data.name === theme); + const currentTheme = THEMES_DATA.find((data) => data.name === theme); return ( <>
- { - currentTheme ? ( - chess-board - ) : ( - chess-board - )} + {currentTheme ? ( + chess-board + ) : ( + chess-board + )}
+
-
- chess-board -
-
-

Found an Issue!

-

Please create an issue in our github website below. You are also invited to contribute on the project.

- - icon -

Github

-
-
+
+ chess-board +
+ +
+

Found an Issue!

+

+ Please create an issue in our github website below. You are also invited to contribute on the project. +

+ + + icon +

Github

+
+
+