Skip to content

Commit

Permalink
adiciona código ao perfil
Browse files Browse the repository at this point in the history
  • Loading branch information
guiopen committed Jul 1, 2024
1 parent fa0a517 commit e73bb50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/src/pages/Profile/ProfileInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function ProfileInfo({ userData, openFieldEditModal }) {
/>
</div>
<hr className="profile-info-divider" />
<p><strong>Código:</strong> {userData.code}</p>
</div>
);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Profile/UserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ function UserProfile() {
const [activeField, setActiveField] = useState(null);
const [activeTab, setActiveTab] = useState('perfil');
const { token } = useAuth();
const [userData, setUserData] = useState({ name: '', email: '', password: '' });
const [userData, setUserData] = useState({ name: '', email: '', password: '', code: '' });
const [isFriendSummaryModalOpen, setIsFriendSummaryModalOpen] = useState(false);
const [friendHistory, setFriendHistory] = useState([]);

const handleFetchUserData = async () => {
try {
const data = await fetchUserData(token);
console.log('Dados do usuário:', data);
setUserData({ name: data.name, email: data.email, password: data.password });
setUserData({ name: data.name, email: data.email, password: data.password, code: data.code });
} catch (error) {
console.error('Erro ao buscar dados:', error);
}
Expand Down

0 comments on commit e73bb50

Please sign in to comment.