add action editor

This commit is contained in:
Robert 2024-03-09 00:14:04 +07:00
parent dd30941fd4
commit 5ff78c461b
No known key found for this signature in database
GPG Key ID: F631C7FD957D5F22

View File

@ -1,5 +1,6 @@
import type { Chain } from "@/entities/chain/schema"; import type { Chain } from "@/entities/chain/schema";
import { ActionEditor } from "@/widgets/action-editor";
import { RenameChainButton } from "@/features/rename-chain"; import { RenameChainButton } from "@/features/rename-chain";
import { DeleteChainButton } from "@/features/delete-chain"; import { DeleteChainButton } from "@/features/delete-chain";
@ -13,7 +14,8 @@ interface ChainEditorProps {
export default function ChainEditor({ chain }: ChainEditorProps) { export default function ChainEditor({ chain }: ChainEditorProps) {
if (!chain.actions || chain.actions.length === 0) if (!chain.actions || chain.actions.length === 0)
return ( return (
<> <div className="flex h-full flex-col">
<div className="flex items-center justify-between">
<Breadcrumbs sx={{ fontSize: "24px" }}> <Breadcrumbs sx={{ fontSize: "24px" }}>
<Typography <Typography
variant="h5" variant="h5"
@ -30,11 +32,21 @@ export default function ChainEditor({ chain }: ChainEditorProps) {
Новый пост Новый пост
</Typography> </Typography>
</Breadcrumbs> </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 ( return (
<div key={chain._id} className="flex items-center justify-between"> <div className="flex items-center justify-between">
<Typography <Typography
variant="h5" variant="h5"
sx={{ color: "#4C4E64DE", opacity: "87%" }} sx={{ color: "#4C4E64DE", opacity: "87%" }}