refactor: improve admin style in status page

This commit is contained in:
moonrailgun 2024-09-16 16:41:39 +08:00
parent 42f41cdbcb
commit ed2141af22
2 changed files with 7 additions and 4 deletions

View File

@ -21,16 +21,18 @@ import {
SheetHeader,
SheetTrigger,
} from '@/components/ui/sheet';
import { cn } from '@/utils/style';
interface MonitorStatusPageProps {
slug: string;
showBackBtn?: boolean;
fullWidth?: boolean;
}
export const MonitorStatusPage: React.FC<MonitorStatusPageProps> = React.memo(
(props) => {
const { t } = useTranslation();
const { slug, showBackBtn = true } = props;
const { slug, showBackBtn = true, fullWidth } = props;
const { data: info } = trpc.monitor.getPageInfo.useQuery({
slug,
@ -120,8 +122,9 @@ export const MonitorStatusPage: React.FC<MonitorStatusPageProps> = React.memo(
</Helmet>
<div
className={clsx(
'mx-auto w-full overflow-auto px-4 py-8 md:w-4/5 xl:w-3/5'
className={cn(
'mx-auto overflow-auto px-4 py-8',
fullWidth ? 'w-full' : 'w-full md:w-4/5 xl:w-3/5'
)}
>
<div className="flex">

View File

@ -86,7 +86,7 @@ function PageComponent() {
/>
}
>
<MonitorStatusPage slug={slug} showBackBtn={false} />
<MonitorStatusPage slug={slug} showBackBtn={false} fullWidth={true} />
</CommonWrapper>
);
}