From bb1b156d2f102332dba91b422c1573f8d3230c96 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Wed, 27 Nov 2024 05:07:02 +0800 Subject: [PATCH] fix: build failed. #2156 --- src/components/layout/scroll-top-button.tsx | 6 ++++-- src/pages/profiles.tsx | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/layout/scroll-top-button.tsx b/src/components/layout/scroll-top-button.tsx index 49b8c1d3..8813541e 100644 --- a/src/components/layout/scroll-top-button.tsx +++ b/src/components/layout/scroll-top-button.tsx @@ -1,12 +1,13 @@ -import { IconButton, Fade } from "@mui/material"; +import { IconButton, Fade, SxProps, Theme } from "@mui/material"; import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; interface Props { onClick: () => void; show: boolean; + sx?: SxProps; } -export const ScrollTopButton = ({ onClick, show }: Props) => { +export const ScrollTopButton = ({ onClick, show, sx }: Props) => { return ( { : "rgba(0,0,0,0.2)", }, visibility: show ? "visible" : "hidden", + ...sx, }} > diff --git a/src/pages/profiles.tsx b/src/pages/profiles.tsx index e15c0d19..41e81b2c 100644 --- a/src/pages/profiles.tsx +++ b/src/pages/profiles.tsx @@ -1,8 +1,7 @@ -import useSWR, { mutate } from "swr"; +import useSWR from "swr"; import { useEffect, useMemo, useRef, useState } from "react"; import { useLockFn } from "ahooks"; import { Box, Button, IconButton, Stack, Divider, Grid2 } from "@mui/material"; -import { FileDropEvent, getCurrent } from "@tauri-apps/plugin-window"; import { DndContext, closestCenter, @@ -75,7 +74,6 @@ const ProfilePage = () => { const unlisten = await addListener( TauriEvent.DRAG_DROP, async (event: any) => { - console.log("文件拖放事件:", event); const paths = event.payload.paths; for (let file of paths) { @@ -131,9 +129,7 @@ const ProfilePage = () => { const type1 = ["local", "remote"]; - const profileItems = items.filter((i) => i && type1.includes(i.type!)); - - return profileItems; + return items.filter((i) => i && type1.includes(i.type!)); }, [profiles]); const currentActivatings = () => {