mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
17 lines
547 B
JavaScript
17 lines
547 B
JavaScript
'use client';
|
|
import React, { useEffect, useState } from 'react';
|
|
import Chat from '@/components/Chat';
|
|
import { useSession } from '@/context/SessionContext';
|
|
import { useEstablishment } from '@/context/EstablishmentContext';
|
|
|
|
export default function MessageriePage() {
|
|
const { user } = useSession(); // Doit fournir l'id du parent connecté
|
|
const { selectedEstablishmentId } = useEstablishment();
|
|
|
|
if (!user) return <div>Chargement...</div>;
|
|
|
|
return (
|
|
<Chat userProfileId={user.id} establishmentId={selectedEstablishmentId} />
|
|
);
|
|
}
|