Skip to content

Commit

Permalink
6.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed May 16, 2024
1 parent ab88434 commit f670a54
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_API_URL=https://clothcraft.azurewebsites.net
REACT_APP_API_URL=http://localhost:8080
5 changes: 1 addition & 4 deletions src/components/Profile/ProfileCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ const ProfileCard = ({ profileData }) => {

// Limpiar el base64
base64Image = cleanBase64(base64Image);

console.log(base64Image);


const response = await apiClient.patch('/user/photo', { photoProfile: base64Image });

if (response.status === 200) {
// Actualiza la imagen en el estado local
setUploadedImage(base64Image);
console.log(base64Image);
}
} catch (error) {
console.error('Error updating profile image:', error);
Expand Down
6 changes: 6 additions & 0 deletions src/pages/Home/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
color: inherit;
padding: 5px 0px;
}

.detailsInput{
background: #D1C8C1 !important;
color: #86654B !important;
border: none;
}
18 changes: 16 additions & 2 deletions src/pages/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import { Button, Form, Row, Col } from 'react-bootstrap';
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import Sections from '../../components/Outfit/Sections';
import { CgProfile } from "react-icons/cg";
import InputGroup from 'react-bootstrap/InputGroup';

// This component is the main page of the application, it shows the navbar and the outfit component.
const Home = () => {
// This state is used to show the modal to create an outfit.
const [show, setShow] = useState(false);
const handleClose = () => setShow(false);
const handleShow = () => setShow(true);
const [layersTypes, setLayersTypes] = useState([]);
const [layersTypes, setLayersTypes] = useState([]);

// These states are used to store the data of the outfit.
const [name, setName] = useState('');
Expand Down Expand Up @@ -85,6 +87,18 @@ const Home = () => {
<div className='col-12'>
<NavBar />
</div>
<div className='col-7 offset-1 d-flex mt-4 mb-3'>
<CgProfile className='mx-2' size={40}/>
<InputGroup >
<Form.Control
className='detailsInput'
placeholder="Enter the outfit details"
aria-label="Enter the outfit details"
aria-describedby="basic-addon1"
/>
</InputGroup>

</div>
<div className='row col-12 p-0 m-0'>
<div className='col-10 offset-1 col-sm-6 offset-sm-3 col-md-4 offset-md-4 col-lg-3 offset-lg-2 mt-5'>
<Outfit layersTypes={layersTypes}
Expand All @@ -100,7 +114,7 @@ const Home = () => {
setLayersTypes(layers);
}}
/>

</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Register/Register.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function SignUp() {
});

console.log(response.data); // Aquí puedes manejar la respuesta del servidor
window.location.href = '/';
window.location.href = '/login';
} catch (error) {
console.error('Error al enviar la solicitud:', error);
}
Expand Down

0 comments on commit f670a54

Please sign in to comment.