Skip to content

Commit

Permalink
Merge branch 'profile' of https://github.com/ridabensalem/tour-trek i…
Browse files Browse the repository at this point in the history
…nto profile
  • Loading branch information
AmineBaray committed Jun 7, 2024
2 parents 0fb810f + e50d3d6 commit 6fe3080
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 3 additions & 4 deletions app/components/profile/Payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ const Payments = () => {
};

const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
// Handle form submission here
event.preventDefault();
// Add your logic for form submission

console.log("Form submitted!");
// Reset form state

setShowForm(false);
};

Expand All @@ -36,7 +35,7 @@ const Payments = () => {
<span className="text-zinc-500">****1714</span>
</div>
</div>
<div className="flex justify-end"> {/* This div aligns the button to the right */}
<div className="flex justify-end">
<button className="text-rose-500 mr-4 p-1 font-bold border-2 border-transparent hover:border-rose-500 rounded-lg">remove</button>
</div>
</div>
Expand Down
11 changes: 5 additions & 6 deletions app/components/profile/PersonalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface UserProfileCardProps {
}
}

const UserProfileCard: React.FC<UserProfileCardProps> = ({ user }) => {
const PersonalInfo = () => {
return (
<ProfileFrameElement text="Personal information">
<form className="space-y-4 m-4 px-8">
Expand All @@ -19,7 +19,7 @@ const UserProfileCard: React.FC<UserProfileCardProps> = ({ user }) => {
<div className="grid grid-cols-2">
<div className="flex flex-col mr-2">
<label className="mb-1 font-medium">Name</label>
<input type="text" value={user.name || "Not Available"} className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
<input type="text" value="" className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
</div>
<div className="flex flex-col ml-2">
<label className="mb-1 font-medium">Surname</label>
Expand All @@ -29,7 +29,7 @@ const UserProfileCard: React.FC<UserProfileCardProps> = ({ user }) => {

<div className="flex flex-col">
<label className="mb-1 font-medium">Email</label>
<input type="email" value={user.email || "Not Available"} className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
<input type="email" value="" className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
</div>
<div className="flex flex-col">
<label className="mb-1 font-medium">Contact Number</label>
Expand All @@ -38,7 +38,7 @@ const UserProfileCard: React.FC<UserProfileCardProps> = ({ user }) => {
<div className="grid grid-cols-2 mr-2">
<div className="flex flex-col">
<label className="mb-1 font-medium">Date of Birth</label>
<input type="date" value={user.email || "Not Available"} className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
<input type="date" value="" className="p-2 border rounded focus:border-pink-500 focus:outline-none" />
</div>
<div className="flex flex-col ml-2">
<label className="mb-1 font-medium">Gender</label>
Expand All @@ -58,5 +58,4 @@ const UserProfileCard: React.FC<UserProfileCardProps> = ({ user }) => {
</ProfileFrameElement>
);
}

export default UserProfileCard;
export default PersonalInfo;

0 comments on commit 6fe3080

Please sign in to comment.