Prevent two composers from being shown (#35006)
This commit is contained in:
parent
629bb74451
commit
8cf246e4d3
4 changed files with 70 additions and 65 deletions
13
app/javascript/mastodon/hooks/useLayout.ts
Normal file
13
app/javascript/mastodon/hooks/useLayout.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import type { LayoutType } from '../is_mobile';
|
||||
import { useAppSelector } from '../store';
|
||||
|
||||
export const useLayout = () => {
|
||||
const layout = useAppSelector(
|
||||
(state) => state.meta.get('layout') as LayoutType,
|
||||
);
|
||||
|
||||
return {
|
||||
singleColumn: layout === 'single-column' || layout === 'mobile',
|
||||
layout,
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue