29 lines
824 B
TypeScript
29 lines
824 B
TypeScript
import { getConfiguredDingtalkCorpId, normalizeDingtalkCorpId } from '@/lib/dingtalk-corp'
|
|
import { normalizeInternalRedirectPath } from '@/lib/safe-redirect'
|
|
import DingtalkEntryClient from './DingtalkEntryClient'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
export const revalidate = 0
|
|
|
|
type DingtalkEntryPageProps = {
|
|
searchParams?: {
|
|
redirect?: string
|
|
corpId?: string
|
|
corpid?: string
|
|
}
|
|
}
|
|
|
|
export default function DingtalkEntryPage({ searchParams }: DingtalkEntryPageProps) {
|
|
const redirectPath = normalizeInternalRedirectPath(searchParams?.redirect, '/performance-survey')
|
|
const corpId =
|
|
normalizeDingtalkCorpId(searchParams?.corpId || searchParams?.corpid) ||
|
|
getConfiguredDingtalkCorpId()
|
|
|
|
return (
|
|
<DingtalkEntryClient
|
|
corpId={corpId}
|
|
redirectPath={redirectPath}
|
|
/>
|
|
)
|
|
}
|