Skip to content

Commit b300a5b

Browse files
Merge pull request #613 from OpenSignLabs/fix_issue
fix : logo issue in guest login flow
2 parents a388a7c + 5422fef commit b300a5b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

apps/OpenSign/src/pages/GuestLogin.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import loader from "../assets/images/loader2.gif";
55
import axios from "axios";
66
import { isEnableSubscription, themeColor } from "../constant/const";
77
import { contractUsers, getAppLogo } from "../constant/Utils";
8+
import logo from "../assets/images/logo.png";
89

910
function GuestLogin() {
1011
const { id, userMail, contactBookId, serverUrl } = useParams();
@@ -14,9 +15,7 @@ function GuestLogin() {
1415
const [EnterOTP, setEnterOtp] = useState(false);
1516
const [loading, setLoading] = useState(false);
1617
const [isLoading, setIsLoading] = useState(true);
17-
const [appLogo, setAppLogo] = useState(
18-
"https://qikinnovation.ams3.digitaloceanspaces.com/logo.png"
19-
);
18+
const [appLogo, setAppLogo] = useState("");
2019

2120
useEffect(() => {
2221
handleServerUrl();
@@ -31,8 +30,10 @@ function GuestLogin() {
3130
if (applogo) {
3231
setAppLogo(applogo);
3332
} else {
34-
setAppLogo(localStorage.getItem("appLogo") || "");
33+
setAppLogo(logo);
3534
}
35+
} else {
36+
setAppLogo(logo);
3637
}
3738

3839
//split url in array from '&'
@@ -178,7 +179,13 @@ function GuestLogin() {
178179
>
179180
<div className="main_head">
180181
<div className="w-[250px] h-[66px] inline-block overflow-hidden">
181-
<img src={appLogo} className="object-contain h-full" alt="logo" />
182+
{appLogo && (
183+
<img
184+
src={appLogo}
185+
className="object-contain h-full"
186+
alt="logo"
187+
/>
188+
)}
182189
</div>
183190
</div>
184191

0 commit comments

Comments
 (0)