fix: mas check in browser
This commit is contained in:
parent
82c3defbee
commit
0feb73557c
|
|
@ -111,3 +111,7 @@ export const getBlockchainExplorerUrl = () => {
|
|||
return `https://scan.rss3.io`
|
||||
}
|
||||
}
|
||||
|
||||
export const isInMAS = () => {
|
||||
return typeof process !== "undefined" && process.mas
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import { m } from "framer-motion"
|
|||
import { useTranslation } from "react-i18next"
|
||||
|
||||
import { useCurrentModal } from "~/components/ui/modal/stacked/hooks"
|
||||
import { isInMAS } from "~/lib/utils"
|
||||
import { useAuthProviders } from "~/queries/users"
|
||||
|
||||
import { LoginWithPassword } from "./Form"
|
||||
|
|
@ -45,7 +46,7 @@ export const LoginModalContent = (props: LoginModalContentProps) => {
|
|||
</div>
|
||||
|
||||
<LoginWithPassword runtime={runtime} />
|
||||
{!process.mas && (
|
||||
{!isInMAS() && (
|
||||
<>
|
||||
<div className="my-3 w-full space-y-2">
|
||||
<div className="flex items-center justify-center">
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { Label } from "@follow/components/ui/label/index.js"
|
|||
import { signOut } from "@follow/shared/auth"
|
||||
|
||||
import { useModalStack } from "~/components/ui/modal/stacked/hooks"
|
||||
import { isInMAS } from "~/lib/utils"
|
||||
import { AccountManagement } from "~/modules/profile/account-management"
|
||||
import { EmailManagement } from "~/modules/profile/email-management"
|
||||
import { ProfileSettingForm } from "~/modules/profile/profile-setting-form"
|
||||
|
|
@ -36,7 +37,7 @@ export function Component() {
|
|||
<UpdatePasswordForm />
|
||||
<TwoFactor />
|
||||
{/* TODO: Temporary fake account deletion feature */}
|
||||
{process.mas && (
|
||||
{isInMAS() && (
|
||||
<div className="flex items-center justify-between">
|
||||
<Label>Delete Account</Label>
|
||||
<Button
|
||||
|
|
|
|||
Loading…
Reference in New Issue