'use client';
import React, { useEffect, useState } from 'react';
import Chat from '@/components/Chat';

import { useEstablishment } from '@/context/EstablishmentContext';

export default function MessageriePage() {
  const { user, selectedEstablishmentId } = useEstablishment();

  if (!user) return <div>Chargement...</div>;

  return (
    <Chat userProfileId={user.id} establishmentId={selectedEstablishmentId} />
  );
}
