From 32f5b3b3cfae1189fa4bf58334ea97cc14ff39d1 Mon Sep 17 00:00:00 2001 From: --remove-section Date: Tue, 20 Jan 2026 20:17:20 +0530 Subject: [PATCH] refactor: cleanup search animation --- src/components/queueListItem/index.tsx | 25 ++++++++-------- src/components/search/index.tsx | 40 +++++++++++++++++--------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/components/queueListItem/index.tsx b/src/components/queueListItem/index.tsx index ef65234..755020c 100644 --- a/src/components/queueListItem/index.tsx +++ b/src/components/queueListItem/index.tsx @@ -1,12 +1,10 @@ import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client"; import { - alpha, Box, IconButton, ListItem, ListItemAvatar, ListItemText, - Typography, } from "@mui/material"; import React from "react"; import getImageUrlsApi from "@/utils/methods/getImageUrlsApi"; @@ -32,7 +30,6 @@ const QueueListItem = ({ onPlay, dragHandleProps, isEpisode, - index, className, sx, }: QueueListItemProps) => { @@ -219,16 +216,18 @@ const QueueListItem = ({ diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx index 72b2813..286362d 100644 --- a/src/components/search/index.tsx +++ b/src/components/search/index.tsx @@ -2,10 +2,10 @@ import { ItemSortBy } from "@jellyfin/sdk/lib/generated-client"; import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api"; import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api"; import { - alpha, Box, Button, Dialog, + Grow, IconButton, InputBase, LinearProgress, @@ -13,6 +13,7 @@ import { Typography, useTheme, } from "@mui/material"; +import type { TransitionProps } from "@mui/material/transitions"; import { useQuery } from "@tanstack/react-query"; import { useNavigate } from "@tanstack/react-router"; import { register } from "@tauri-apps/plugin-global-shortcut"; @@ -32,6 +33,15 @@ import { useCentralStore } from "@/utils/store/central"; import useSearchStore from "@/utils/store/search"; import SearchItem from "./item"; +const Transition = React.forwardRef(function Transition( + props: TransitionProps & { + children: React.ReactElement; + }, + ref: React.Ref, +) { + return ; +}); + const Search = () => { const theme = useTheme(); const { isOpen, handleClose, toggleSearchDialog } = useSearchStore( @@ -138,21 +148,25 @@ const Search = () => { return (