Skip to content

Commit

Permalink
fix: handle exceptional case when channel is missing on mobile layout (
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 authored Jan 19, 2024
1 parent 0f8fc3a commit 4d13847
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/App/MobileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ export const MobileLayout: React.FC<MobileLayoutProps> = (
onProfileEditSuccess={onProfileEditSuccess}
onChannelSelect={(channel) => {
setCurrentChannel(channel);
setPanel(PANELS.CHANNEL);
if (channel) {
setPanel(PANELS.CHANNEL);
} else {
setPanel(PANELS.CHANNEL_LIST);
}
}}
allowProfileEdit={allowProfileEdit}
// this condition must be true for mobile
Expand Down

0 comments on commit 4d13847

Please sign in to comment.