fix(external): should hard go back to app home
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
ef46c70a98
commit
6786e20303
|
|
@ -1,12 +1,11 @@
|
|||
import { PoweredByFooter } from "@follow/components/common/PoweredByFooter.jsx"
|
||||
import { Logo } from "@follow/components/icons/logo.jsx"
|
||||
import { Button } from "@follow/components/ui/button/index.js"
|
||||
import { useLocation, useNavigate } from "react-router-dom"
|
||||
import { useLocation } from "react-router-dom"
|
||||
|
||||
export const NotFound = () => {
|
||||
const location = useLocation()
|
||||
|
||||
const navigate = useNavigate()
|
||||
return (
|
||||
<div className="prose center m-auto size-full flex-col dark:prose-invert">
|
||||
<main className="flex grow flex-col items-center justify-center">
|
||||
|
|
@ -21,7 +20,7 @@ export const NotFound = () => {
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<Button onClick={() => navigate("/")}>Back to Home</Button>
|
||||
<Button onClick={() => (window.location.href = "/")}>Back to Home</Button>
|
||||
</p>
|
||||
</main>
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function Login() {
|
|||
const isAuthenticated = status === "authenticated"
|
||||
const onOpenInWebApp = () => {
|
||||
if (isAuthenticated) {
|
||||
navigate("/")
|
||||
window.location.href = "/"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,8 @@ import { Button } from "@follow/components/ui/button/index.js"
|
|||
import { DEEPLINK_SCHEME } from "@follow/shared/constants"
|
||||
import { useEffect, useRef } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { useNavigate } from "react-router-dom"
|
||||
|
||||
export function Component() {
|
||||
const navigate = useNavigate()
|
||||
const { t } = useTranslation("external")
|
||||
|
||||
const getCallbackUrl = async () => {
|
||||
|
|
@ -44,7 +42,7 @@ export function Component() {
|
|||
variant="text"
|
||||
className="h-14 px-10 text-base"
|
||||
onClick={() => {
|
||||
navigate("/")
|
||||
window.location.href = "/"
|
||||
}}
|
||||
>
|
||||
{t("redirect.continueInBrowser")}
|
||||
|
|
|
|||
Loading…
Reference in New Issue