diff --git a/index.html b/index.html
index 98dcfbb..82ce2e1 100644
--- a/index.html
+++ b/index.html
@@ -2,10 +2,10 @@
{/* Seccion de imagenes (Posible slider u otra forma de mostrar las imagenes) */}
diff --git a/src/components/ExperienceDetail/ImageCardExperience.tsx b/src/components/ExperienceDetail/ImageCardExperience.tsx
index 0458188..a76a2dd 100644
--- a/src/components/ExperienceDetail/ImageCardExperience.tsx
+++ b/src/components/ExperienceDetail/ImageCardExperience.tsx
@@ -1,11 +1,11 @@
-import exampleImage from "../../assets/exampleImage.png";
+// import exampleImage from "../../assets/exampleImage.png";
import { Swiper, SwiperSlide } from "swiper/react";
import { Pagination } from "swiper/modules";
import "swiper/css";
import "swiper/css/pagination";
-function ImageCardExperience({title, rating} : {title: string, rating: number}) {
- const photos = [exampleImage, exampleImage, exampleImage];
+function ImageCardExperience({title, rating, images} : {title: string, rating: number, images: string[]}) {
+ // const photos = [exampleImage, exampleImage, exampleImage];
const getRating = (rating: number) => {
switch (rating) {
@@ -22,7 +22,6 @@ function ImageCardExperience({title, rating} : {title: string, rating: number})
}
};
-
return (
- {photos.map((photo, index) => (
+ {images.map((photo, index) => (
{title}
- {getRating(rating)?.stars} 10 Reviews
+ {getRating(rating)?.stars} {/* 10 Reviews */}
))}
diff --git a/src/components/ExperienceDetail/ReviewCard.tsx b/src/components/ExperienceDetail/ReviewCard.tsx
index 726c2e0..3071d22 100644
--- a/src/components/ExperienceDetail/ReviewCard.tsx
+++ b/src/components/ExperienceDetail/ReviewCard.tsx
@@ -13,6 +13,8 @@ interface IReview {
function ReviewCard({review} : {review: IReview}) {
const { rating, comment, createdAt, userName, userAvatar } = review;
+ const userImage = "https://medvirturials.com/img/default-image.png"
+
console.log(review)
const getRating = (rating: number) => {
@@ -34,7 +36,7 @@ function ReviewCard({review} : {review: IReview}) {
return (
-
+
{userName ?? "Usuario"}
{getRating(rating)?.stars} {formatToShortDate(createdAt)}
diff --git a/src/components/Filters/Filters.tsx b/src/components/Filters/Filters.tsx
index 29bebf1..51029e5 100644
--- a/src/components/Filters/Filters.tsx
+++ b/src/components/Filters/Filters.tsx
@@ -266,7 +266,7 @@ const Filters: React.FC = () => {
>
diff --git a/src/components/Home/homePage.tsx b/src/components/Home/homePage.tsx
index 99825e3..c91e82c 100644
--- a/src/components/Home/homePage.tsx
+++ b/src/components/Home/homePage.tsx
@@ -132,7 +132,7 @@ const Home: React.FC = () => {
@@ -164,7 +164,7 @@ const Home: React.FC = () => {
ultimaLlamadaExperiences.map((experience) => (
handleImageClick(experience.id)}>
diff --git a/src/components/UserProfile/UserProfile.tsx b/src/components/UserProfile/UserProfile.tsx
index 09f112b..6a5c3a5 100644
--- a/src/components/UserProfile/UserProfile.tsx
+++ b/src/components/UserProfile/UserProfile.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react"
+import { useState, useEffect, useContext } from "react"
import userServices from "../../services/user.services"
import { userInitialValues } from "../../consts/userInitialValues"
@@ -8,11 +8,13 @@ import DetailsCard from "./DetailsCard"
import Logout from "../Logout"
import AddExperienceButton from "./AddExperienceButton"
import { useLocation } from "react-router-dom";
+import { AuthContext } from "../../contexts/auth.context"
const UserProfile: React.FC = () => {
const path = useLocation();
+ const { user } = useContext(AuthContext)
const [userInfo, setUserInfo] = useState
(userInitialValues)
const loadUserInfo = async () => {
@@ -36,14 +38,14 @@ const UserProfile: React.FC = () => {
const { email, location, name, phone, role } = userInfo
const userImage = "https://medvirturials.com/img/default-image.png"
-
+ console.log(userInfo)
return (
{role.toUpperCase() === 'PROVIDER' && (
diff --git a/src/services/auth.services.ts b/src/services/auth.services.ts
index 32d7fbc..7b6fd7e 100644
--- a/src/services/auth.services.ts
+++ b/src/services/auth.services.ts
@@ -36,6 +36,10 @@ class AuthServices {
logout(token: string) {
return this.api.post('/logout', null, { headers: { Authorization: `Bearer ${token}` } });
}
+
+ async resendCode(email: string) {
+ return this.api.post("/resend-code", { email })
+ }
}
const authServices = new AuthServices()
diff --git a/src/types/detailexperience.ts b/src/types/detailexperience.ts
index b4921fc..acca663 100644
--- a/src/types/detailexperience.ts
+++ b/src/types/detailexperience.ts
@@ -10,5 +10,6 @@ export interface DetailExperience {
rating: number,
capacity: number,
createdAt: string,
- status: boolean
+ status: boolean,
+ experienceImages: string[]
}
\ No newline at end of file
diff --git a/src/types/experience.ts b/src/types/experience.ts
index 48bfe9d..e8d7f8e 100644
--- a/src/types/experience.ts
+++ b/src/types/experience.ts
@@ -10,5 +10,6 @@ export interface IExperience {
rating: number;
capacity: number;
createdAt: Date;
+ experienceImages: string[]
}