mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Better display of epochs
This commit is contained in:
parent
bea445bafa
commit
e3129032e8
8 changed files with 216 additions and 70 deletions
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import { AllEvents, Variable } from "../schema";
|
||||
import { Engine } from "../engine/engine";
|
||||
import EventList from "./EventList";
|
||||
|
@ -29,7 +29,9 @@ export default function Ui({ events }: UiProps): JSX.Element {
|
|||
});
|
||||
|
||||
engine.stepTo(engine.lastEventIndex());
|
||||
const subs = engine.subs.snapshot();
|
||||
const subs = engine.subsSnapshot();
|
||||
|
||||
const [epoch, setEpoch] = useState(subs.epoch);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -46,6 +48,7 @@ export default function Ui({ events }: UiProps): JSX.Element {
|
|||
toggleVariableVis={(variable: Variable) =>
|
||||
ee.emit("toggleVariable", variable)
|
||||
}
|
||||
currentEpoch={epoch}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-1 min-h-[50%] h-full">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue