Commit 97153a59 authored by Chunchi Che's avatar Chunchi Che

optimize small

parent 73ff9804
Pipeline #22985 passed with stages
in 16 minutes and 8 seconds
...@@ -313,13 +313,16 @@ const ActionButton: React.FC<{ ...@@ -313,13 +313,16 @@ const ActionButton: React.FC<{
onMoraSelect: (mora: Mora) => void; onMoraSelect: (mora: Mora) => void;
onTpSelect: (tp: Tp) => void; onTpSelect: (tp: Tp) => void;
}> = ({ onMoraSelect, onTpSelect }) => { }> = ({ onMoraSelect, onTpSelect }) => {
const { stage } = useSnapshot(roomStore); const { stage, isHost } = useSnapshot(roomStore);
return ( return (
<MoraPopover onSelect={onMoraSelect}> <MoraPopover onSelect={onMoraSelect}>
<TpPopover onSelect={onTpSelect}> <TpPopover onSelect={onTpSelect}>
<SpecialButton <SpecialButton
className={styles["btns-action"]} className={styles["btns-action"]}
disabled={stage != RoomStage.WAITING} disabled={
stage != RoomStage.WAITING ||
(stage == RoomStage.WAITING && !isHost)
}
onClick={() => { onClick={() => {
sendHsStart(); sendHsStart();
}} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment