mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 11:11:11 +02:00
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
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',
|
|
multiColumn: layout === 'multi-column',
|
|
layout,
|
|
};
|
|
};
|