diff --git a/src/components/User/UserData.js b/config/content/Profile.js similarity index 92% rename from src/components/User/UserData.js rename to config/content/Profile.js index f86a549..d5ab433 100644 --- a/src/components/User/UserData.js +++ b/config/content/Profile.js @@ -1,18 +1,18 @@ export const UserData = [ { - id: 1, fieldName: 'Name', - fieldValue: 'John Doe', + key: 'name', + fieldValue: '', }, { - id: 2, fieldName: 'Email', - fieldValue: 'johndoe@inno.nitrkl.in', + key: 'email', + fieldValue: '', }, { - id: 3, fieldName: 'Phone', - fieldValue: '555-5555-555', + key: 'mobile', + fieldValue: '', }, ]; @@ -20,7 +20,7 @@ export const RegisteredEvents = [ { id: 1, img: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1695674904/got_lungcp.jpg', - title: 'A Feast for Crows', + title: 'A Feast for Crows Helloopooooo', clubName: 'House Frey', date: '17 July', location: 'LA', diff --git a/src/components/User/User.jsx b/src/components/User/User.jsx index 4d471a9..56b0aff 100644 --- a/src/components/User/User.jsx +++ b/src/components/User/User.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useContext } from 'react'; import { DetailContainer, Legend, @@ -7,39 +7,48 @@ import { DetailWrapper, RegEventContainer, } from './styles'; -import { UserData, RegisteredEvents as RegEvents } from './UserData'; +import { UserData, RegisteredEvents as RegEvents } from '../../../config/content/Profile'; import { Heading2 } from '../shared'; import RegisteredEventCard from './RegisteredEventCard'; +import { AuthContext } from '../../utils/Auth'; const DataContainer = ({ name, value }) => ( -
- ); + +); + +const User = () => { + const { userData } = useContext(AuthContext); -const User = () => ( + return (