dify/web/app/signin/forms.tsx

35 lines
708 B
TypeScript
Raw Normal View History

2023-05-15 08:51:32 +08:00
'use client'
import React from 'react'
import { useSearchParams } from 'next/navigation'
import cn from 'classnames'
2023-05-15 08:51:32 +08:00
import NormalForm from './normalForm'
import OneMoreStep from './oneMoreStep'
const Forms = () => {
const searchParams = useSearchParams()
const step = searchParams.get('step')
const getForm = () => {
switch (step) {
case 'next':
return <OneMoreStep />
default:
return <NormalForm />
}
}
return <div className={
cn(
'flex flex-col items-center w-full grow justify-center',
2023-05-15 08:51:32 +08:00
'px-6',
'md:px-[108px]',
)
}>
<div className='flex flex-col md:w-[400px]'>
{getForm()}
</div>
</div>
}
export default Forms