'use client' import React, { useEffect, useState } from 'react' import cn from 'classnames' import Script from 'next/script' import Loading from '../components/base/loading' import Forms from './forms' import Header from './_header' import style from './page.module.css' import EnterpriseSSOForm from './enterpriseSSOForm' import { IS_CE_EDITION } from '@/config' import { getEnterpriseFeatures } from '@/service/enterprise' import type { EnterpriseFeatures } from '@/types/enterprise' import { defaultEnterpriseFeatures } from '@/types/enterprise' const SignIn = () => { const [loading, setLoading] = useState(true) const [enterpriseFeatures, setEnterpriseFeatures] = useState(defaultEnterpriseFeatures) useEffect(() => { getEnterpriseFeatures().then((res) => { setEnterpriseFeatures(res) }).finally(() => { setLoading(false) }) }, []) return ( <> {!IS_CE_EDITION && ( <> )}
{loading && (
)} {!loading && !enterpriseFeatures.sso_enforced_for_signin && ( <>
© {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
)} {!loading && enterpriseFeatures.sso_enforced_for_signin && ( )}
) } export default SignIn