Port bbd88d356d772a5b8210fce06403ccd043a11f1a to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
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,
|
|
};
|
|
};
|