link-stack/apps/link/app/(main)/tickets/[id]/layout.tsx

34 lines
923 B
TypeScript
Raw Normal View History

2023-06-26 10:07:12 +00:00
"use client";
import { ConversationHeader } from "@chatscope/chat-ui-kit-react";
2023-06-26 10:07:12 +00:00
import { Grid } from "@mui/material";
type LayoutProps = {
detail: any;
edit: any;
header: any;
2023-06-26 10:07:12 +00:00
params: {
id: string;
};
};
export default function Layout({ detail, edit, header, params: { id } }: LayoutProps) {
2023-06-26 10:07:12 +00:00
return (
<Grid container spacing={0} sx={{ height: "100%" }} direction="row" wrap="wrap">
<Grid item sx={{ order: 0, display: { xs: "block", md: "none" } }} xs={12}>
<ConversationHeader>
<ConversationHeader.Content>
{header}
</ConversationHeader.Content>
</ConversationHeader>
</Grid>
<Grid item sx={{ height: {xs: "auto", md: "100%"}, order: {xs: 3, md: 1} }} xs={12} md={9}>
2023-06-26 10:07:12 +00:00
{detail}
</Grid>
<Grid item xs={12} md={3} sx={{ height: {xs: "auto", md: "100%"}, order: 2 }}>
2023-06-26 10:07:12 +00:00
{edit}
</Grid>
</Grid>
);
}