用 Tailwind CSS 重写 Dashboard/index.tsx 和 ToolCard.tsx
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { Box } from '@mui/material';
|
||||
import { useRouter } from '@/providers/RouterProvider';
|
||||
import ToolCard from '@/pages/Dashboard/ToolCard';
|
||||
import { getFeatureByKey } from '@/config/features';
|
||||
import type { PageType } from '@/types/storage';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { dashboardPageStyles } from '@/config/pageTheme';
|
||||
|
||||
export default function DashboardPage() {
|
||||
const { navigateTo, visiblePages, pageOrder } = useRouter();
|
||||
@@ -14,7 +12,7 @@ export default function DashboardPage() {
|
||||
const visibleSet = useMemo(() => new Set(visiblePages), [visiblePages]);
|
||||
|
||||
return (
|
||||
<Box sx={dashboardPageStyles.GRID_CONTAINER}>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-[repeat(auto-fill,minmax(300px,1fr))] auto-rows-fr gap-2 p-2">
|
||||
{pageOrder.map((key) => {
|
||||
if (!visibleSet.has(key as PageType)) return null;
|
||||
|
||||
@@ -32,6 +30,6 @@ export default function DashboardPage() {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user