Skip to content

Commit baed509

Browse files
committed
fix(toolbar): hide unfinished record control
1 parent ae346c5 commit baed509

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

src/components/TopToolbar.jsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import {
1414
setTransportMode,
1515
} from "../store";
1616

17+
// Keep the unfinished recording control easy to re-enable when recording lands.
18+
const SHOW_RECORD_BUTTON = false;
19+
1720
export function TopToolbar() {
1821
const dispatch = useDispatch();
1922
const [authDialogOpen, setAuthDialogOpen] = useState(false);
@@ -43,14 +46,18 @@ export function TopToolbar() {
4346
>
4447
{transport.isPlaying ? <Square size={15} /> : <Play size={15} />}
4548
</button>
46-
<button
47-
className={"transport-btn" + (transport.isRecording ? " is-rec" : "")}
48-
onClick={function () {
49-
dispatch(setRecording(!transport.isRecording));
50-
}}
51-
>
52-
<Circle size={15} />
53-
</button>
49+
{SHOW_RECORD_BUTTON ? (
50+
<button
51+
className={"transport-btn" + (transport.isRecording ? " is-rec" : "")}
52+
title={transport.isRecording ? "Stop recording" : "Record"}
53+
aria-label={transport.isRecording ? "Stop recording" : "Record"}
54+
onClick={function () {
55+
dispatch(setRecording(!transport.isRecording));
56+
}}
57+
>
58+
<Circle size={15} />
59+
</button>
60+
) : null}
5461

5562
<DraggableBpm
5663
value={transport.bpm}

0 commit comments

Comments
 (0)