Skip to content

Commit

Permalink
Iterate frame title rendering when set to room
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Fosco committed Dec 13, 2023
1 parent 41bdd59 commit 848f836
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ export const RoomConfig: React.FunctionComponent<Props> = ({
}
FetchFrame();
}, [room.targetId]);

const renderedTitle = title ? `to ${title}` : 'frame';

return (
<div key={room.id} className="room">
<div className="room-controls">
<h3 className="room-controls-title" title={room.name}>
{room.name}
</h3>
<IconButton
label={room.targetId && title ? `Room is set to ${title}` : "Set frame to room"}
label={room.targetId ? `Room is set to ${renderedTitle}` : "Set frame to room"}
variant={room.targetId ? "outline" : "ghost"}
disabled={!isEditable}
onClick={() => onSelectTarget(room)}
Expand Down

0 comments on commit 848f836

Please sign in to comment.