Skip to content

Commit

Permalink
fix: remove early null return in app context
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodylow committed Sep 16, 2024
1 parent c94b056 commit 12d347e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 0 additions & 7 deletions apps/router/src/context/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,6 @@ export const AppContextProvider: React.FC<AppContextProviderProps> = ({
});
}, []);

if (
Object.keys(state.guardians).length === 0 &&
Object.keys(state.gateways).length === 0
) {
return null;
}

return (
<AppContext.Provider value={{ ...state, dispatch }}>
{children}
Expand Down
5 changes: 2 additions & 3 deletions apps/router/src/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
Tr,
useDisclosure,
} from '@chakra-ui/react';
import { Wrapper } from '@fedimint/ui';
import { useTranslation } from '@fedimint/utils';
import { AppContext } from '../context/AppContext';
import { ConnectServiceModal } from './ConnectServiceModal';
Expand Down Expand Up @@ -117,9 +116,9 @@ export const HomePage: React.FC = () => {
}, [guardians, gateways, t, onOpen]);

return (
<Wrapper>
<>
{content}
<ConnectServiceModal isOpen={isOpen} onClose={onClose} />
</Wrapper>
</>
);
};

0 comments on commit 12d347e

Please sign in to comment.