import React from 'react';
import { UserProvider } from './UserContext';
import { RoomProvider } from './RoomContext';

interface AppProviderProps {
  children: React.ReactNode;
}

/**
 * 全局上下文提供者组件
 * 整合所有上下文，提供全局状态管理
 */
export const AppProvider: React.FC<AppProviderProps> = ({ children }) => {
  return (
    <UserProvider>
      <RoomProvider>
        {children}
      </RoomProvider>
    </UserProvider>
  );
};

export default AppProvider; 