mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Note if no epoch selected
This commit is contained in:
parent
66b6b8b53d
commit
9cf9a0d0b3
2 changed files with 9 additions and 8 deletions
|
@ -1,15 +1,10 @@
|
|||
import React from "react";
|
||||
import FileInput, { LoadedEvents } from "./components/FileInput";
|
||||
import Ui from "./components/Ui";
|
||||
import data from "./checkmate.json";
|
||||
import { AllEvents } from "./schema";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
|
||||
export default function App() {
|
||||
const [events, setEvents] = React.useState<LoadedEvents | null>({
|
||||
kind: "ok",
|
||||
events: data as AllEvents,
|
||||
});
|
||||
const [events, setEvents] = React.useState<LoadedEvents | null>(null);
|
||||
|
||||
return (
|
||||
<BrowserRouter>
|
||||
|
|
|
@ -66,7 +66,14 @@ export default function Ui({ events }: UiProps): JSX.Element {
|
|||
selectedEpochs={selectedEpochs}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-1 min-h-[50%] h-full flex flex-col">
|
||||
<div className="flex-1 min-h-[50%] h-full flex flex-col place-content-center shadow">
|
||||
{selectedEpochs.length === 0 && (
|
||||
<span className="text-center">
|
||||
<span className="p-2 border rounded-md bg-gray-200 inline-block">
|
||||
Select an event to view.
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
{subsTop !== undefined && (
|
||||
<VariablesGraphView
|
||||
subs={subsTop}
|
||||
|
@ -98,7 +105,6 @@ function VariablesGraphView({
|
|||
graphEe,
|
||||
eventListEe,
|
||||
}: VariablesGraphViewProps): JSX.Element {
|
||||
console.log("re-rendering...");
|
||||
return (
|
||||
<VariablesGraph subs={subs} graphEe={graphEe} eventListEe={eventListEe} />
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue