aboutsummaryrefslogtreecommitdiffstats
path: root/ui/src/pages/Runbooks.tsx
blob: a0b844a6ad3f42e5efd2a152e2e03f8e60ef805b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Editor from "@/components/runbooks/editor/Editor";
import List from "@/components/runbooks/List";

import { useStore } from "@/state/store";

export default function Runbooks() {
  const currentRunbook = useStore((store) => store.currentRunbook);

  return (
    <div className="flex w-full !max-w-full flex-row ">
      <List />
      {currentRunbook && (
        <div className="flex w-full">
          <Editor />
        </div>
      )}

      {!currentRunbook && (
        <div className="flex align-middle justify-center flex-col h-screen w-full">
          <h1 className="text-center">Select or create a runbook</h1>
        </div>
      )}
    </div>
  );
}