add action editor
This commit is contained in:
parent
dd30941fd4
commit
5ff78c461b
|
|
@ -1,5 +1,6 @@
|
|||
import type { Chain } from "@/entities/chain/schema";
|
||||
|
||||
import { ActionEditor } from "@/widgets/action-editor";
|
||||
import { RenameChainButton } from "@/features/rename-chain";
|
||||
import { DeleteChainButton } from "@/features/delete-chain";
|
||||
|
||||
|
|
@ -13,28 +14,39 @@ interface ChainEditorProps {
|
|||
export default function ChainEditor({ chain }: ChainEditorProps) {
|
||||
if (!chain.actions || chain.actions.length === 0)
|
||||
return (
|
||||
<>
|
||||
<Breadcrumbs sx={{ fontSize: "24px" }}>
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ color: "#4C4E64DE", opacity: "60%" }}
|
||||
className="select-none"
|
||||
>
|
||||
{chain.name}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ color: "#4C4E64DE", opacity: "87%" }}
|
||||
className="select-none"
|
||||
>
|
||||
Новый пост
|
||||
</Typography>
|
||||
</Breadcrumbs>
|
||||
</>
|
||||
<div className="flex h-full flex-col">
|
||||
<div className="flex items-center justify-between">
|
||||
<Breadcrumbs sx={{ fontSize: "24px" }}>
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ color: "#4C4E64DE", opacity: "60%" }}
|
||||
className="select-none"
|
||||
>
|
||||
{chain.name}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ color: "#4C4E64DE", opacity: "87%" }}
|
||||
className="select-none"
|
||||
>
|
||||
Новый пост
|
||||
</Typography>
|
||||
</Breadcrumbs>
|
||||
|
||||
<div className="flex items-center gap-x-5">
|
||||
<RenameChainButton chain={chain} />
|
||||
<DeleteChainButton chain={chain} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex grow flex-col items-center justify-center">
|
||||
<ActionEditor />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div key={chain._id} className="flex items-center justify-between">
|
||||
<div className="flex items-center justify-between">
|
||||
<Typography
|
||||
variant="h5"
|
||||
sx={{ color: "#4C4E64DE", opacity: "87%" }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user