refactor: base origin

This commit is contained in:
Tristan Yang
2023-02-23 22:19:24 +08:00
parent 6d28e7d649
commit d10df4bee5
2 changed files with 8 additions and 6 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
import { useNavigate } from "react-router-dom";
import { BASE_ORIGIN } from "../../app/config";
import { resetAuthData } from "../../app/slices/auth.data";
import { useAppSelector } from "../../app/store";
import QRCode from "../../common/component/QRCode";
@@ -26,7 +27,7 @@ const GuestBlankPlaceholder = () => {
<div className="flex flex-col gap-2">
<span className="text-gray-400 dark:text-gray-200 my-3 text-sm">{t("guest_login_tip")}</span>
<div className="w-44 h-44 self-center mb-4">
<QRCode size={1200} link={`https://voce.chat/login?s=${encodeURIComponent(location.origin)}`} />
<QRCode size={1200} link={`https://voce.chat/login?s=${encodeURIComponent(BASE_ORIGIN)}`} />
</div>
<Button onClick={handleSignIn} className="small">{t("sign_in")}</Button>
</div>