minor bugs

This commit is contained in:
2021-10-02 10:28:55 -03:00
parent 756ab5cd03
commit fdbd8a1be6
3 changed files with 11 additions and 7 deletions

View File

@@ -178,7 +178,7 @@ const Account = () => {
<div className={actualState === 'API UPLOADED' ? 'disabled' : null}>
<div className="next-step-title">
<h1>One more step...</h1>
<h2>Insert your <a href="https://clockify.me/help/faq/where-can-find-api-information">Clockify API</a> here</h2>
<h2>Insert your <a href="https://clockify.me/help/faq/where-can-find-api-information" target="_blank">Clockify API</a> here</h2>
</div>
<form

View File

@@ -18,6 +18,7 @@ const ClockifyTasksDisplay = (props) => {
const [projectsDone, setProjectsDone] = useState(false)
const [loading, setLoading] = useState(true)
const [apiAvailable, setApiAvailable] = useState(false)
const getApiKey = async () => {
@@ -30,12 +31,10 @@ const ClockifyTasksDisplay = (props) => {
const dataSnap = await getDoc(reference)
const result = await dataSnap.data()
if (result.keyClockify) {
setApiAvailable(true)
await generateArrayOfWorkspaces(result.keyClockify)
}
@@ -70,7 +69,6 @@ const ClockifyTasksDisplay = (props) => {
const getApiKeyReturn = key
const data = await makeRequestWorkspaces(key)
@@ -166,7 +164,8 @@ const ClockifyTasksDisplay = (props) => {
props.setProjectID(e)
}
if (loading && userUID) {
if (loading && userUID !== '' && apiAvailable) {
return (
<div className="clockify-tasks-display loading-container">
<img src={loadingGif} alt=""/>
@@ -175,6 +174,10 @@ const ClockifyTasksDisplay = (props) => {
}
if (!apiAvailable) {
return (<div></div>)
}
return (
<>
{

View File

@@ -38,6 +38,7 @@ const Identify = (props) => {
const uid = response.user.uid
addNewUserToFirebase(uid)
props.history.push('/config-account')
} catch (error) {