Fix export from segment config
This commit is contained in:
parent
3e199cf8d4
commit
5e976bfc0d
3 changed files with 8 additions and 3 deletions
|
@ -3,13 +3,14 @@
|
|||
import { startTransition, useEffect, useRef, useState } from "react"
|
||||
import styles from "./auth.module.css"
|
||||
import Link from "../../components/link"
|
||||
import { getSession, signIn } from "next-auth/react"
|
||||
import { signIn } from "next-auth/react"
|
||||
import Input from "@components/input"
|
||||
import Button from "@components/button"
|
||||
import { GitHub } from "react-feather"
|
||||
import { useToasts } from "@components/toasts"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
import Note from "@components/note"
|
||||
|
||||
const Auth = ({
|
||||
page,
|
||||
requiresServerPassword,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import config from "@lib/config"
|
||||
import Auth from "../components"
|
||||
|
||||
export function isGithubEnabled() {
|
||||
function isGithubEnabled() {
|
||||
return config.github_client_id.length && config.github_client_secret.length ? true : false
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
import Auth from "../components"
|
||||
import { getRequiresPasscode } from "pages/api/auth/requires-passcode"
|
||||
import { isGithubEnabled } from "../signin/page"
|
||||
import config from "@lib/config"
|
||||
|
||||
const getPasscode = async () => {
|
||||
return await getRequiresPasscode()
|
||||
}
|
||||
|
||||
function isGithubEnabled() {
|
||||
return config.github_client_id.length && config.github_client_secret.length ? true : false
|
||||
}
|
||||
|
||||
export default async function SignUpPage() {
|
||||
const requiresPasscode = await getPasscode()
|
||||
return <Auth page="signup" requiresServerPassword={requiresPasscode} isGithubEnabled={isGithubEnabled()} />
|
||||
|
|
Loading…
Reference in a new issue