From 6d542fc2ecb4bc97038e104d5541100772540676 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 5 Oct 2019 13:29:49 -0300 Subject: Logo bugfix --- src/Home.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Home.js b/src/Home.js index 1695ed4..9ba6c0b 100644 --- a/src/Home.js +++ b/src/Home.js @@ -66,10 +66,12 @@ class Home extends Component { } handeMouseMove(e) { - let traX = (4 * e.pageX) / 480; - let traY = (4 * e.pageY) / 250; - document.getElementById("baiLogo").style.backgroundPosition = - traX + "%" + traY + "%"; + if (this.state.isLoaded) { + let traX = (4 * e.pageX) / 480; + let traY = (4 * e.pageY) / 250; + document.getElementById("baiLogo").style.backgroundPosition = + traX + "%" + traY + "%"; + } } componentWillUnmount() { -- cgit v1.2.1-18-gbd029