From 42cf851d635e006c8dda11e09d9b52d07d1afcd2 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Mon, 1 Sep 2025 23:02:57 +0200 Subject: [PATCH] disable back animation --- apps/web/src/components/editor/media-panel/views/stickers.tsx | 1 + apps/web/src/components/ui/input-with-back.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/editor/media-panel/views/stickers.tsx b/apps/web/src/components/editor/media-panel/views/stickers.tsx index b6c64bd0..0d293242 100644 --- a/apps/web/src/components/editor/media-panel/views/stickers.tsx +++ b/apps/web/src/components/editor/media-panel/views/stickers.tsx @@ -358,6 +358,7 @@ function StickersContentView({ category }: { category: StickerCategory }) { } value={localSearchQuery} onChange={setLocalSearchQuery} + disableAnimation={true} /> diff --git a/apps/web/src/components/ui/input-with-back.tsx b/apps/web/src/components/ui/input-with-back.tsx index ea225c14..cae9f8c9 100644 --- a/apps/web/src/components/ui/input-with-back.tsx +++ b/apps/web/src/components/ui/input-with-back.tsx @@ -12,6 +12,7 @@ interface InputWithBackProps { placeholder?: string; value?: string; onChange?: (value: string) => void; + disableAnimation?: boolean; } export function InputWithBack({ @@ -20,12 +21,13 @@ export function InputWithBack({ placeholder = "Search anything", value, onChange, + disableAnimation = false, }: InputWithBackProps) { const [containerRef, setContainerRef] = useState(null); const [buttonOffset, setButtonOffset] = useState(-60); const smoothTransition = { - duration: 0.35, + duration: disableAnimation ? 0 : 0.35, ease: [0.25, 0.1, 0.25, 1] as const, };