Skip to content

Commit 5daf0d0

Browse files
committed
reduce diff
1 parent ce01481 commit 5daf0d0

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,12 @@ export function ChatPageContent(props: {
8787
NebulaContext | undefined
8888
>(() => {
8989
const contextRes = props.session?.context;
90-
91-
// If we have context from an existing session, use that
92-
if (contextRes) {
93-
return {
94-
chainIds: contextRes.chain_ids,
95-
walletAddress: contextRes.wallet_address,
96-
};
97-
}
98-
99-
return {
100-
chainIds: null,
101-
walletAddress: null,
90+
const value: NebulaContext = {
91+
chainIds: contextRes?.chain_ids || null,
92+
walletAddress: contextRes?.wallet_address || null,
10293
};
94+
95+
return value;
10396
});
10497

10598
const setContextFilters = useCallback((v: NebulaContext | undefined) => {

0 commit comments

Comments
 (0)