Skip to content

Commit

Permalink
🐛 fix: Fix mobile session style
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 authored May 9, 2024
1 parent c1f87d1 commit 998a191
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/app/(main)/chat/_layout/Mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,31 @@ import { useQuery } from '@/hooks/useQuery';
import { LayoutProps } from './type';

const useStyles = createStyles(({ css, token }) => ({
active: css`
display: unset;
`,
main: css`
position: relative;
overflow: hidden;
display: none;
background: ${token.colorBgLayout};
`,
}));

const Layout = memo<LayoutProps>(({ children, session }) => {
const { showMobileWorkspace } = useQuery();
const { cx, styles } = useStyles();
const { styles } = useStyles();

return (
<>
<Flexbox
className={cx(styles.main, !showMobileWorkspace && styles.active)}
className={styles.main}
height="100%"
style={showMobileWorkspace ? { display: 'none' } : undefined}
width="100%"
>
{session}
</Flexbox>
<Flexbox
className={cx(styles.main, showMobileWorkspace && styles.active)}
className={styles.main}
height="100%"
id={'lobe-workspace-mobile'}
style={showMobileWorkspace ? undefined : { display: 'none' }}
width="100%"
>
{children}
Expand Down

0 comments on commit 998a191

Please sign in to comment.