diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 6ce025a..efd932d 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -9,7 +9,6 @@ import { isDefined, isUndefined } from "helpers/others"; import { cIf, cJoin } from "helpers/className"; import { OpenGraph, TITLE_PREFIX, TITLE_SEPARATOR } from "helpers/openGraph"; import { Ids } from "types/ids"; -import { useContainerQueries } from "contexts/ContainerQueriesContext"; import { atoms } from "contexts/atoms"; import { useAtomGetter, useAtomPair } from "helpers/atoms"; @@ -52,7 +51,8 @@ export const AppLayout = ({ const langui = useAtomGetter(atoms.localData.langui); - const { is1ColumnLayout, isScreenAtLeastXs } = useContainerQueries(); + const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout); + const isScreenAtLeastXs = useAtomGetter(atoms.containerQueries.isScreenAtLeastXs); const handlers = useSwipeable({ onSwipedLeft: (SwipeEventData) => { diff --git a/src/components/Containers/ContentPanel.tsx b/src/components/Containers/ContentPanel.tsx index 954507b..add70a4 100644 --- a/src/components/Containers/ContentPanel.tsx +++ b/src/components/Containers/ContentPanel.tsx @@ -1,4 +1,5 @@ -import { useContainerQueries } from "contexts/ContainerQueriesContext"; +import { atoms } from "contexts/atoms"; +import { useAtomGetter } from "helpers/atoms"; import { cIf, cJoin } from "helpers/className"; /* @@ -25,7 +26,7 @@ export const ContentPanel = ({ children, className, }: Props): JSX.Element => { - const { isContentPanelAtLeast3xl } = useContainerQueries(); + const isContentPanelAtLeast3xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast3xl); return (
{ - const { isSubPanelAtLeastXs } = useContainerQueries(); + const isSubPanelAtLeastXs = useAtomGetter(atoms.containerQueries.isSubPanelAtLeastXs); return (
void; @@ -138,7 +139,7 @@ const ControlButtons = ({ onCloseRequest, toggleFullscreen, }: ControlButtonsProps): JSX.Element => { - const { is1ColumnLayout } = useContainerQueries(); + const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout); const PreviousButton = () => (