This commit is contained in:
parent
1128a01e4c
commit
70a8e15be9
1 changed files with 6 additions and 8 deletions
|
@ -38,7 +38,7 @@ type StringRes = Record<
|
|||
|
||||
const Home: ParentComponent = (props) => {
|
||||
let panelList: HTMLDivElement;
|
||||
const [t] = createTranslator(
|
||||
const [t, [stringRes]] = createTranslator(
|
||||
(code) => import(`./i18n/${code}.json`) as Promise<{ default: StringRes }>,
|
||||
);
|
||||
const now = createTimeSource();
|
||||
|
@ -105,17 +105,15 @@ const Home: ParentComponent = (props) => {
|
|||
|
||||
const windowSize = useWindowSize();
|
||||
createEffect((last) => {
|
||||
if (last !== windowSize.width) {
|
||||
const { width } = windowSize;
|
||||
if (last !== width) {
|
||||
requestRecalculateTabIndicator();
|
||||
}
|
||||
return width;
|
||||
});
|
||||
|
||||
const [inTransition] = useTransition();
|
||||
|
||||
createEffect(() => {
|
||||
if (!inTransition()) {
|
||||
requestAnimationFrame(recalculateTabIndicator);
|
||||
}
|
||||
requestRecalculateTabIndicator();
|
||||
});
|
||||
|
||||
const isTabFocus = (idx: number) => {
|
||||
|
@ -178,7 +176,7 @@ const Home: ParentComponent = (props) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<DocumentTitle>Timelines</DocumentTitle>
|
||||
<DocumentTitle>Timelines</DocumentTitle>
|
||||
<Scaffold
|
||||
topbar={
|
||||
<AppTopBar>
|
||||
|
|
Loading…
Add table
Reference in a new issue