mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
style: cleanup empty fields
This commit is contained in:
@@ -7,6 +7,12 @@ export default function InfoTitle(props) {
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
||||
const { title, data } = props;
|
||||
|
||||
const noTitl = data.title == null || data.title === '';
|
||||
const noPres = data.presenter == null || data.presenter === '';
|
||||
const noSubt = data.subtitle == null || data.subtitle === '';
|
||||
const noNote = data.note == null || data.note === '';
|
||||
|
||||
return (
|
||||
<div className={style.container}>
|
||||
<div className={style.header}>
|
||||
@@ -21,19 +27,27 @@ export default function InfoTitle(props) {
|
||||
{!collapsed && (
|
||||
<>
|
||||
<div>
|
||||
<span className={style.label}>Title: </span>
|
||||
<span className={noTitl ? style.emptyLabel : style.label}>
|
||||
Title
|
||||
</span>
|
||||
{data.title}
|
||||
</div>
|
||||
<div>
|
||||
<span className={style.label}>Presenter: </span>
|
||||
<span className={noPres ? style.emptyLabel : style.label}>
|
||||
Presenter
|
||||
</span>
|
||||
{data.presenter}
|
||||
</div>
|
||||
<div>
|
||||
<span className={style.label}>Subtitle: </span>
|
||||
<span className={noSubt ? style.emptyLabel : style.label}>
|
||||
Subtitle
|
||||
</span>
|
||||
{data.subtitle}
|
||||
</div>
|
||||
<div className={style.notes}>
|
||||
<span className={style.label}>Note: </span>
|
||||
<span className={noNote ? style.emptyLabel : style.label}>
|
||||
Note
|
||||
</span>
|
||||
{data.note}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user