style: fix styles

This commit is contained in:
MystiPanda
2024-03-10 23:45:23 +08:00
parent 2ecae40130
commit 7186575cb1
9 changed files with 147 additions and 82 deletions

View File

@@ -7,11 +7,13 @@ import { getRules } from "@/services/api";
import { BaseEmpty, BasePage } from "@/components/base";
import RuleItem from "@/components/rule/rule-item";
import { ProviderButton } from "@/components/rule/provider-button";
import { useCustomTheme } from "@/components/layout/use-custom-theme";
const RulesPage = () => {
const { t } = useTranslation();
const { data = [] } = useSWR("getRules", getRules);
const { theme } = useCustomTheme();
const isDark = theme.palette.mode === "dark";
const [filterText, setFilterText] = useState("");
const rules = useMemo(() => {
@@ -53,7 +55,14 @@ const RulesPage = () => {
/>
</Box>
<Box height="calc(100% - 50px)">
<Box
height="calc(100% - 70px)"
sx={{
margin: "12px",
borderRadius: "8px",
bgcolor: isDark ? "#282a36" : "#ffffff",
}}
>
{rules.length > 0 ? (
<Virtuoso
data={rules}