diff --git a/src/App.tsx b/src/App.tsx index 194b427..e646ba4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,7 +7,11 @@ import { useBudgetReducer, initialInitDataRes, } from './budget'; -import { ErrorBoundary, Startup } from './components'; +import { + ErrorBoundary, + Startup, + ScrollBarDimensionProvider, +} from './components'; import styles from './App.module.scss'; import { useNumberFormatter, useRetryResource } from './lib'; import { useMoneyMoney } from './moneymoney'; @@ -71,7 +75,7 @@ export default function AppWrapper() { ); return ( -
-
+ ); } diff --git a/src/components/Content/Content.module.scss b/src/components/Content/Content.module.scss index a5205ba..32b5232 100644 --- a/src/components/Content/Content.module.scss +++ b/src/components/Content/Content.module.scss @@ -1,6 +1,7 @@ .content { margin-top: var(--header-height); height: calc(100vh - var(--header-height)); + overflow: hidden; } .padding { padding: 0 2rem; diff --git a/src/components/Content/Content.tsx b/src/components/Content/Content.tsx index e95a66d..f24d015 100644 --- a/src/components/Content/Content.tsx +++ b/src/components/Content/Content.tsx @@ -1,7 +1,6 @@ import React, { ReactNode } from 'react'; import classNames from 'classnames'; import styles from './Content.module.scss'; -import ScrollbarDimensionProvider from '../ScrollBarDimensionProvider'; type Props = { className?: string; @@ -22,7 +21,7 @@ export default function Content({ return ( <> {header} - {children} - + ); } diff --git a/src/components/index.ts b/src/components/index.ts index f63bfd1..1cf599f 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -10,5 +10,6 @@ export { default as Select } from './Select'; export { default as Row } from './Row'; export { default as Button } from './Button'; export { default as InfiniteSlider } from './InfiniteSlider'; +export { default as ScrollBarDimensionProvider } from './ScrollBarDimensionProvider'; export * from './TabBar'; export type ScrollTo = ScrollToT; diff --git a/src/views/Month/Month.module.scss b/src/views/Month/Month.module.scss index a16bdb4..7aea3c4 100644 --- a/src/views/Month/Month.module.scss +++ b/src/views/Month/Month.module.scss @@ -6,20 +6,12 @@ max-width: calc(100vw - var(--sidebar-width) - var(--scrollbar-x, 0)); height: var(--sidebar-height, 'auto'); @media (min-width: 800px) { - min-width: calc( - calc(100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 2 - ); - max-width: calc( - calc(100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 2 - ); + min-width: calc((100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 2); + max-width: calc((100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 2); } @media (min-width: 1100px) { - min-width: calc( - calc(100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 3 - ); - max-width: calc( - calc(100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 3 - ); + min-width: calc((100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 3); + max-width: calc((100vw - var(--sidebar-width) - var(--scrollbar-x, 0)) / 3); } }