Team Ai
Apppublic

Deepvest/ProfilingAI

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
AppContainer-checkpoint.tsx35 linesDownload Raw Back to .ipynb_checkpoints
1import React, { useState } from 'react';2import UserProfileForm from './UserProfileForm';3 4const AppContainer: React.FC = () => {5  const [currentProfile, setCurrentProfile] = useState(null);6 7  const handleProfileSubmit = async (profileData) => {8    try {9      setCurrentProfile(profileData);10      window.Streamlit.setComponentValue({11        type: 'PROFILE_UPDATE',12        data: profileData13      });14    } catch (error) {15      console.error('Error handling profile submission:', error);16    }17  };18 19  return (20    <div className="h-full p-4">21      <UserProfileForm onSubmit={handleProfileSubmit} />22      {currentProfile && (23        <div className="mt-4">24          <h3 className="text-lg font-medium">Profil actuel</h3>25          <pre className="mt-2 p-4 bg-gray-100 rounded">26            {JSON.stringify(currentProfile, null, 2)}27          </pre>28        </div>29      )}30    </div>31  );32};33 34export default AppContainer;35