Skip to content

Commit

Permalink
some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hunxjunedo committed Nov 17, 2024
1 parent dc96590 commit eab9021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ const Themes: React.FC = () => {
useEffect(()=>{
//to update the current focused theme based on url and fetched themes
const focusedThemeId = searchParams.get('theme') || '';
if(focusedThemeId == ''){
if (focusedThemeId == '') {
return;
}
const focusedThemeObject = themes.find(theme => theme.id === focusedThemeId);
if(!focusedThemeObject){
if (!focusedThemeObject) {
return
}
setFocusedTheme(focusedThemeObject)
Expand Down Expand Up @@ -161,7 +161,7 @@ const Themes: React.FC = () => {
</div>
<ThemeModal
isOpen={focusedTheme !== null}
onClose={()=>(setFocusedTheme(modalCloseHandler))}
onClose={()=>(setFocusedTheme(modalCloseHandler()))}
theme={focusedTheme as Theme}
/>
{/* Drawer Section */}
Expand Down

0 comments on commit eab9021

Please sign in to comment.