Skip to content

Commit

Permalink
Update UserUpdate.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
amelinaa committed Dec 24, 2024
1 parent e87f237 commit 21a7abc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/pages/UserUpdate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { useParams } from 'react-router-dom';
import { Form, Button, Spinner, Alert } from "react-bootstrap";

function EditUserForm({ userId, onUpdate }) {
const [user, setUser] = useState(null); // Данные пользователя
const [loading, setLoading] = useState(true); // Индикатор загрузки
const [error, setError] = useState(null); // Ошибки
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
const {id} = useParams();
// Загружаем данные пользователя с сервера

useEffect(() => {
const fetchUserData = async () => {
try {
Expand Down

0 comments on commit 21a7abc

Please sign in to comment.