refactor: enforce semantic values and numeric lint rules

This commit is contained in:
2026-09-13 14:37:25 +03:00
parent 24d332e063
commit 53c852b437
21 changed files with 190 additions and 47 deletions
+6 -1
View File
@@ -3,6 +3,8 @@ import * as m from "motion/react-m";
import type { FC, PropsWithChildren } from "react";
import { useLocation } from "react-router";
const TRANSITION_DURATION_SECONDS = 0.2;
const RouteTransition: FC<PropsWithChildren> = (props) => {
const { children } = props;
const { pathname } = useLocation();
@@ -14,7 +16,10 @@ const RouteTransition: FC<PropsWithChildren> = (props) => {
key={pathname}
initial={reduceMotion ? false : { opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: reduceMotion ? 0 : 0.2, ease: "easeOut" }}
transition={{
duration: reduceMotion ? 0 : TRANSITION_DURATION_SECONDS,
ease: "easeOut",
}}
>
{children}
</m.div>