Removed textColor param

This commit is contained in:
Liam 2022-10-20 10:55:31 +01:00
parent 184a2c54da
commit 23953b38dc
2 changed files with 3 additions and 18 deletions

@ -84,11 +84,11 @@ export default class Home extends Component {
loadPreview() {
this.setState({
isPreviewVisible: true,
previewUrl: this.generateUrl(true),
previewUrl: this.generateUrl(),
});
}
generateUrl(withTc = false) {
generateUrl() {
let values = "";
Object.entries(this.state.values).forEach((value) => {
if (value[1] === undefined) {
@ -102,11 +102,7 @@ export default class Home extends Component {
});
return (
window.location.origin +
"/overlay?id=" +
this.state.steamId +
values +
(withTc ? "&textColor=black" : "")
window.location.origin + "/overlay?id=" + this.state.steamId + values
);
}

@ -26,7 +26,6 @@ export default class Overlay extends Component {
showPlayerStats: true,
showScore: false,
showSongInfo: false,
textColor: undefined,
socket: undefined,
isVisible: false,
@ -115,11 +114,6 @@ export default class Overlay extends Component {
shouldConnectSocket = true;
}
// Mainly used for the preview
if (params.textColor) {
this.setState({ textColor: params.textColor });
}
if (shouldConnectSocket) {
if (this.state.isConnectedToSocket) return;
this.connectSocket(params.socketaddress);
@ -412,11 +406,6 @@ export default class Overlay extends Component {
id,
} = this.state;
if (this.state.textColor !== undefined) {
const element = document.querySelector("." + styles.main);
element.style.color = this.state.textColor;
}
if (loadingPlayerData) {
return <Spinner size="xl" color="white"></Spinner>;
}