rht
This commit is contained in:
parent
096f28aa0d
commit
4085a293f0
|
@ -56,7 +56,6 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [instance, setInstance] = useState<MindElixirInstance | null>(null);
|
||||
const { isAuthenticated, user, hasSomePermissions } = useAuth();
|
||||
|
||||
const { data: post, isLoading }: { data: PostDto; isLoading: boolean } =
|
||||
api.post.findFirst.useQuery({
|
||||
where: {
|
||||
|
@ -182,8 +181,14 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
`mind-thumb-${new Date().toString()}`
|
||||
);
|
||||
};
|
||||
useEffect(()=>{
|
||||
containerRef.current.style.height = `${Math.floor(window.innerHeight/1.25)}px`
|
||||
},[])
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 flex-col w-[90vw] my-5 h-[90vh] border rounded-lg mx-auto">
|
||||
|
||||
<div className="grid grid-cols-1 flex-col w-[90vw] my-5 h-[80vh] border rounded-lg mx-auto">
|
||||
|
||||
{canEdit && taxonomies && (
|
||||
<Form
|
||||
form={form}
|
||||
|
@ -220,7 +225,7 @@ export default function MindEditor({ id }: { id?: string }) {
|
|||
</div>
|
||||
</Form>
|
||||
)}
|
||||
<div ref={containerRef} className="mind-editor" onContextMenu={(e)=>e.preventDefault()} />
|
||||
<div ref={containerRef} className="w-full" onContextMenu={(e)=>e.preventDefault()}/>
|
||||
{canEdit && instance && <NodeMenu mind={instance} />}
|
||||
{isLoading && (
|
||||
<div
|
||||
|
|
Loading…
Reference in New Issue