mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
29 lines
857 B
JavaScript
29 lines
857 B
JavaScript
'use client';
|
|
import React from 'react';
|
|
import InstantChat from '@/components/Chat/InstantChat';
|
|
import { useEstablishment } from '@/context/EstablishmentContext';
|
|
|
|
export default function MessageriePage() {
|
|
const { user, selectedEstablishmentId } = useEstablishment();
|
|
|
|
if (!user?.user_id || !selectedEstablishmentId) {
|
|
return (
|
|
<div className="flex items-center justify-center h-full w-full">
|
|
<div className="text-center">
|
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-gray-900 mx-auto mb-4"></div>
|
|
<p className="text-gray-600">Chargement de la messagerie...</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="h-full flex flex-col">
|
|
<InstantChat
|
|
userProfileId={user.user_id}
|
|
establishmentId={selectedEstablishmentId}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|