const DomainPage = async ({ params }: Props) => {
const { domain, slug } = await params;
const decodedDomain = decodeURIComponent(domain); // xyz.localhost:3000
const decodedSlug = decodeURIComponent(slug); // account
const { getOrganization, getPermissions, getUser } = getKindeServerSession();
const user = await getUser(); // null when at xyz.localhost:3000/account
const organization = await getOrganization(); // null
const permissions = await getPermissions(); // null
return ( ... )
}
const DomainPage = async ({ params }: Props) => {
const { domain, slug } = await params;
const decodedDomain = decodeURIComponent(domain); // xyz.localhost:3000
const decodedSlug = decodeURIComponent(slug); // account
const { getOrganization, getPermissions, getUser } = getKindeServerSession();
const user = await getUser(); // null when at xyz.localhost:3000/account
const organization = await getOrganization(); // null
const permissions = await getPermissions(); // null
return ( ... )
}