diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx
index e7774bc..aa6adac 100644
--- a/src/timelines/Home.tsx
+++ b/src/timelines/Home.tsx
@@ -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 (
<>
- Timelines
+ Timelines