From 09f3dcd1d84aefeebac7fcd5c35a4536edf4b5df Mon Sep 17 00:00:00 2001 From: thecodrr Date: Fri, 15 May 2020 00:51:01 +0500 Subject: [PATCH] fix: text not visible in login bar --- apps/web/src/components/loginbar/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/loginbar/index.js b/apps/web/src/components/loginbar/index.js index 6511cda84..a9a97ddd6 100644 --- a/apps/web/src/components/loginbar/index.js +++ b/apps/web/src/components/loginbar/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import { Flex, Text } from "rebass"; import { useStore as useUserStore } from "../../stores/user-store"; import { getRandom } from "../../utils/random"; @@ -11,6 +11,7 @@ const data = [ function LoginBar() { const isLoggedIn = useUserStore((store) => store.isLoggedIn); + const [text] = useState(data[getRandom(0, data.length)]); if (isLoggedIn) return null; return ( @@ -23,7 +24,7 @@ function LoginBar() { sx={{ cursor: "pointer" }} onClick={showLogInDialog} > - {data[getRandom(0, data.length)]} + {text} Click here to login );