Nucleus transcripts, fixed season api (again), fixed hydration issues
diff --git a/Components/Header.js b/Components/Header.js
index 7d7a1c7..1d9e9e5 100644
--- a/Components/Header.js
+++ b/Components/Header.js
@@ -105,12 +105,13 @@
}
}
}
+ const season = props.season ?? { season: "normal", filePath: "normal" };
return (
<div className={Styles.header} style={{
margin: "0",
minHeight: props.fullscreen ? "calc(100vh - 42px)" : "calc(100vh - (4 * max(2em, 4vw)) - 1em)",
- transform: props.season.season === "aprilFools" ? "rotate(2.5deg)" : "none",
+ transform: season.season === "aprilFools" ? "rotate(2.5deg)" : "none",
transition: "transform 1s cubic-bezier(.47,1.64,.41,.8), background-color 0.3s ease-in-out"
}} id={props.id ? props.id : null}>
<div className={Styles.container} style={{minHeight: props.fullscreen ? "calc(100vh - 42px)" : "calc(100vh - (4 * max(2em, 4vw)) - 1em)"}}>
@@ -153,7 +154,11 @@
<h1 className={Styles.title}>{props.name}</h1>
</div>
<div className={Styles.textBar}>
- <p className={Styles.subtext + " " + (props.buttons.length ? Styles.subtextExtra : null)}>{props.subtext}</p>
+ {
+ props.subtext instanceof String ?
+ <p className={Styles.subtext + " " + (props.buttons.length ? Styles.subtextExtra : null)}>{props.subtext}</p> :
+ props.subtext
+ }
</div>
<a href="#skipNav" id="skipNav" style={{display: "none"}} />
{ props.buttons.length ?
diff --git a/Components/Texttools.js b/Components/Texttools.js
index 57fddc0..76fa8cf 100644
--- a/Components/Texttools.js
+++ b/Components/Texttools.js
@@ -48,11 +48,11 @@
}
render() {
- return <pre
+ return <span
className={Styles.code}
style={{color: `#${this.props.colour}`}}
onClick={this.props.clickable ? () => this.clicked() : () => this.clicked()}
- >{this.state.isPopoverOpen ? "Copied!" : this.props.children}</pre>
+ >{this.state.isPopoverOpen ? "Copied!" : this.props.children}</span>
}
}