chore: update

This commit is contained in:
huzibaca 2024-10-29 10:13:53 +08:00
parent 5e00287045
commit ed3907c273

View File

@ -52,15 +52,19 @@ const LogPage = () => {
)} )}
</IconButton> </IconButton>
<Button {enableLog === true && (
size="small" <Button
variant="contained" size="small"
// useSWRSubscription adds a prefix "$sub$" to the cache key variant="contained"
// https://github.com/vercel/swr/blob/1585a3e37d90ad0df8097b099db38f1afb43c95d/src/subscription/index.ts#L37 // useSWRSubscription adds a prefix "$sub$" to the cache key
onClick={() => mutate("$sub$getClashLog", [])} // https://github.com/vercel/swr/blob/1585a3e37d90ad0df8097b099db38f1afb43c95d/src/subscription/index.ts#L37
> onClick={() => {
{t("Clear")} mutate("$sub$getClashLog", []);
</Button> }}
>
{t("Clear")}
</Button>
)}
</Box> </Box>
} }
> >
@ -94,7 +98,7 @@ const LogPage = () => {
bgcolor: isDark ? "#282a36" : "#ffffff", bgcolor: isDark ? "#282a36" : "#ffffff",
}} }}
> >
{filterLogs.length > 0 ? ( {filterLogs.length > 0 && enableLog === true ? (
<Virtuoso <Virtuoso
initialTopMostItemIndex={999} initialTopMostItemIndex={999}
data={filterLogs} data={filterLogs}