feat: integrate user team retrieval into session components, enhancing sharing functionality and user experience across motivators, sessions, weekly check-ins, and year reviews
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m35s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m35s
This commit is contained in:
@@ -3,6 +3,7 @@ import Link from 'next/link';
|
||||
import { auth } from '@/lib/auth';
|
||||
import { getWorkshop, getSessionsTabUrl } from '@/lib/workshops';
|
||||
import { getMotivatorSessionById } from '@/services/moving-motivators';
|
||||
import { getUserTeams } from '@/services/teams';
|
||||
import type { ResolvedCollaborator } from '@/services/auth';
|
||||
import { MotivatorBoard, MotivatorLiveWrapper } from '@/components/moving-motivators';
|
||||
import { Badge, CollaboratorDisplay } from '@/components/ui';
|
||||
@@ -20,7 +21,10 @@ export default async function MotivatorSessionPage({ params }: MotivatorSessionP
|
||||
return null;
|
||||
}
|
||||
|
||||
const session = await getMotivatorSessionById(id, authSession.user.id);
|
||||
const [session, userTeams] = await Promise.all([
|
||||
getMotivatorSessionById(id, authSession.user.id),
|
||||
getUserTeams(authSession.user.id),
|
||||
]);
|
||||
|
||||
if (!session) {
|
||||
notFound();
|
||||
@@ -81,6 +85,7 @@ export default async function MotivatorSessionPage({ params }: MotivatorSessionP
|
||||
shares={session.shares}
|
||||
isOwner={session.isOwner}
|
||||
canEdit={session.canEdit}
|
||||
userTeams={userTeams}
|
||||
>
|
||||
<MotivatorBoard sessionId={session.id} cards={session.cards} canEdit={session.canEdit} />
|
||||
</MotivatorLiveWrapper>
|
||||
|
||||
Reference in New Issue
Block a user