diff --git a/frontend/src/components/Edit-Profile.js b/frontend/src/components/Edit-Profile.js index 065ab01..462ebad 100644 --- a/frontend/src/components/Edit-Profile.js +++ b/frontend/src/components/Edit-Profile.js @@ -57,12 +57,12 @@ export class EditProfile extends Component {
- +
- ${this.state.is_2FA ? `` : ``} + ${this.state.is_2FA ? `` : ``}
@@ -72,7 +72,6 @@ export class EditProfile extends Component {
-
@@ -80,9 +79,8 @@ export class EditProfile extends Component {
- +
-
@@ -131,15 +129,15 @@ export class EditProfile extends Component { this.addEvent('click', '#profileChange', async (event) => { event.preventDefault(); - // Clear any previous error messages - document.getElementById('nickname-error').textContent = ''; - document.getElementById('image-error').textContent = ''; - // Fetch the values const nickname = document.getElementById('nickname').value; const imageUrl = document.getElementById('image-url').value; const is_2FA = document.getElementById('2fa-toggle').checked; + console.log(nickname); + console.log(imageUrl); + console.log(is_2FA); + // Create FormData object to send file and other data const formData = new FormData(); formData.append('nickname', nickname); @@ -161,19 +159,7 @@ export class EditProfile extends Component { } }) .then(result => { - // nickname이 유효하지 않으면 경고문 띄움 - if (!result.is_valid_nick) { - document.getElementById('nickname-error').textContent = "nickname is invalid!"; - } - - // image가 유효하지 않으면 경고문 띄움 - if (!result.is_valid_img) { - document.getElementById('image-error').textContent = "image is invalid!"; - } - - if (result.is_valid_nick && result.is_valid_img) { - changeUrl(`/main/profile/${this.props.uid}/edit`); - } + changeUrl(`/main/profile/${this.props.uid}/edit`); }) .catch(error => { console.error('Error updating profile:', error); diff --git a/frontend/style.css b/frontend/style.css index ba0d352..a4fd840 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -1216,20 +1216,6 @@ div#edit-nick{ justify-content: center; } -div.edit{ - position: relative; -} - -div#nickname-error { - position: absolute; - bottom: 3px; -} - -div#image-error { - position: absolute; - bottom: 10px; -} - #edit-nick label { display: block; margin-right: 20px; @@ -1239,7 +1225,6 @@ div#image-error { color: #333; } - #edit-nick input[type="text"] { width: 30%; padding: 10px; @@ -1292,7 +1277,7 @@ div#edit-img { color: #333; } -#image-url { +.profile-image-url { margin-top: 10px; width: 80%; height: 80%; @@ -1355,9 +1340,3 @@ button#profileChange { button#profileChange:hover { background-color: #357ABD; } - -.error-message { - color: red; - font-size: 12px; - margin-top: 5px; -} \ No newline at end of file