mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Update project dependencies to React 19 and Next.js 15, including TypeScript type adjustments and async parameter handling across multiple components
39 lines
978 B
TypeScript
39 lines
978 B
TypeScript
import { getOrganizationContextInfo } from '@services/organizations/orgs'
|
|
import LoginClient from './login'
|
|
import { Metadata } from 'next'
|
|
|
|
type MetadataProps = {
|
|
params: Promise<{ orgslug: string }>
|
|
searchParams: Promise<{ [key: string]: string | string[] | undefined }>
|
|
}
|
|
|
|
export async function generateMetadata(params: MetadataProps): Promise<Metadata> {
|
|
const orgslug = (await params.searchParams).orgslug
|
|
|
|
//const orgslug = params.orgslug
|
|
// Get Org context information
|
|
const org = await getOrganizationContextInfo(orgslug, {
|
|
revalidate: 0,
|
|
tags: ['organizations'],
|
|
})
|
|
|
|
return {
|
|
title: 'Login' + ` — ${org.name}`,
|
|
}
|
|
}
|
|
|
|
const Login = async (params: MetadataProps) => {
|
|
const orgslug = (await params.searchParams).orgslug
|
|
const org = await getOrganizationContextInfo(orgslug, {
|
|
revalidate: 0,
|
|
tags: ['organizations'],
|
|
})
|
|
|
|
return (
|
|
<div>
|
|
<LoginClient org={org}></LoginClient>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Login
|