mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
[Glitch] Prevent two composers from being shown
Port 8cf246e4d3 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
13
app/javascript/flavours/glitch/hooks/useLayout.ts
Normal file
13
app/javascript/flavours/glitch/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,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user