Merge from dev to loaf-prod for DEMO #25
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
import { useAuth } from '../context/AuthContext';
|
import { useAuth } from '../context/AuthContext';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
import api from '../utils/api';
|
import api from '../utils/api';
|
||||||
import { Card } from '../components/ui/card';
|
import { Card } from '../components/ui/card';
|
||||||
import { Button } from '../components/ui/button';
|
import { Button } from '../components/ui/button';
|
||||||
@@ -9,7 +10,7 @@ import { Textarea } from '../components/ui/textarea';
|
|||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import Navbar from '../components/Navbar';
|
import Navbar from '../components/Navbar';
|
||||||
import MemberFooter from '../components/MemberFooter';
|
import MemberFooter from '../components/MemberFooter';
|
||||||
import { User, Save, Lock, Heart, Users, Mail, BookUser, Camera, Upload, Trash2 } from 'lucide-react';
|
import { User, ArrowLeft, Save, Lock, Heart, Users, Mail, BookUser, Camera, Upload, Trash2 } from 'lucide-react';
|
||||||
import { Avatar, AvatarImage, AvatarFallback } from '../components/ui/avatar';
|
import { Avatar, AvatarImage, AvatarFallback } from '../components/ui/avatar';
|
||||||
import ChangePasswordDialog from '../components/ChangePasswordDialog';
|
import ChangePasswordDialog from '../components/ChangePasswordDialog';
|
||||||
import TransactionHistory from '../components/TransactionHistory';
|
import TransactionHistory from '../components/TransactionHistory';
|
||||||
@@ -27,6 +28,7 @@ const Profile = () => {
|
|||||||
const [maxFileSizeBytes, setMaxFileSizeBytes] = useState(52428800); // Default 50MB in bytes
|
const [maxFileSizeBytes, setMaxFileSizeBytes] = useState(52428800); // Default 50MB in bytes
|
||||||
const [transactions, setTransactions] = useState({ subscriptions: [], donations: [] });
|
const [transactions, setTransactions] = useState({ subscriptions: [], donations: [] });
|
||||||
const [transactionsLoading, setTransactionsLoading] = useState(true);
|
const [transactionsLoading, setTransactionsLoading] = useState(true);
|
||||||
|
const navigate = useNavigate();
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
// Personal Information
|
// Personal Information
|
||||||
first_name: '',
|
first_name: '',
|
||||||
@@ -244,13 +246,22 @@ const Profile = () => {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<div className="max-w-4xl mx-auto px-6 py-12">
|
<div className="max-w-4xl mx-auto px-6 py-12">
|
||||||
<div className="mb-8">
|
<div className="mb-8 flex justify-between">
|
||||||
<h1 className="text-4xl md:text-5xl font-semibold text-[var(--purple-ink)] mb-4" style={{ fontFamily: "'Inter', sans-serif" }}>
|
<div classname="">
|
||||||
My Profile
|
<h1 className="text-4xl md:text-5xl font-semibold text-[var(--purple-ink)] mb-4" style={{ fontFamily: "'Inter', sans-serif" }}>
|
||||||
</h1>
|
My Profile
|
||||||
<p className="text-lg text-brand-purple " style={{ fontFamily: "'Nunito Sans', sans-serif" }}>
|
</h1>
|
||||||
Update your personal information below.
|
<p className="text-lg text-brand-purple " style={{ fontFamily: "'Nunito Sans', sans-serif" }}>
|
||||||
</p>
|
Update your personal information below.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{/* Todo: functional back button */}
|
||||||
|
<Button
|
||||||
|
onClick={() => navigate(-1)}
|
||||||
|
className="h-fit bg-brand-purple hover:bg-brand-purple/80">
|
||||||
|
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||||
|
Back
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card className="p-8 bg-white rounded-2xl border border-[var(--neutral-800)] shadow-lg">
|
<Card className="p-8 bg-white rounded-2xl border border-[var(--neutral-800)] shadow-lg">
|
||||||
|
|||||||
@@ -323,11 +323,9 @@ const AdminMembers = () => {
|
|||||||
<SelectItem value="active">Active</SelectItem>
|
<SelectItem value="active">Active</SelectItem>
|
||||||
<SelectItem value="payment_pending">Payment Pending</SelectItem>
|
<SelectItem value="payment_pending">Payment Pending</SelectItem>
|
||||||
<SelectItem value="pending_validation">Pending Validation</SelectItem>
|
<SelectItem value="pending_validation">Pending Validation</SelectItem>
|
||||||
<SelectItem value="pre_validated">Pre-Validated</SelectItem>
|
|
||||||
<SelectItem value="inactive">Inactive</SelectItem>
|
<SelectItem value="inactive">Inactive</SelectItem>
|
||||||
<SelectItem value="canceled">Canceled</SelectItem>
|
<SelectItem value="canceled">Canceled</SelectItem>
|
||||||
<SelectItem value="expired">Expired</SelectItem>
|
<SelectItem value="expired">Expired</SelectItem>
|
||||||
<SelectItem value="abandoned">Abandoned</SelectItem>
|
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user