import { IonCard, IonCardContent, IonCardSubtitle, IonCardTitle, IonCol, IonContent, IonGrid, IonHeader, IonIcon, IonNote, IonPage, IonRow, useIonRouter, useIonViewWillEnter, } from '@ionic/react'; import { chevronBack } from 'ionicons/icons'; import { useEffect } from 'react'; import { useRef, useState } from 'react'; import { useParams } from 'react-router'; import { Swiper, SwiperSlide } from 'swiper/react'; // import 'swiper/swiper.scss'; import 'swiper/css'; import { collections, people, tags } from '../data'; import styles from './Profile.module.scss'; const Profile = () => { const { id } = useParams(); const router = useIonRouter(); const headingRef = useRef(null); const [slideSpace, setSlideSpace] = useState(0); const [profile, setProfile] = useState([]); useIonViewWillEnter(() => { setSlideSpace(5); }); useEffect(() => { headingRef.current.classList.add('animate__slideInLeft'); headingRef.current.style.display = ''; }, []); useEffect(() => { const getProfile = async () => { const person = await people.filter((person) => parseInt(person.id) === parseInt(id))[0]; setProfile(person); }; getProfile(); }, [id]); return (
header
router.goBack()}>
avatar {profile.name}

{profile.location}

Purchased {profile.purchased} Wished {profile.wished} Likes {profile.likes}
Collection
{collections.map((collection, index) => { return ( collection
{collection.name} {collection.no} wardrobes
); })}
Tags {tags.map((tag, index) => { return ( {tag} ); })}
); }; export default Profile;