fix: preserve week-long sessions and add profile mascot
Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
fbc827c2b8
commit
f32289f583
18 files changed
+240
-25
No files matched your search
@@ -14,9 +14,12 @@ const CATEGORY_LABEL: Record<PointsLogRow['category'], string> = {
|
||||
admin: 'Other',
|
||||
};
|
||||
|
||||
const MANFRED_POSES = ['confident', 'coffee', 'celebrating', 'waving'];
|
||||
|
||||
export function Profile() {
|
||||
const { contact, registration, signOut, refresh } = useAuth();
|
||||
const { toast } = useToast();
|
||||
const [manfredPose] = useState(() => MANFRED_POSES[Math.floor(Math.random() * MANFRED_POSES.length)]);
|
||||
const [log, setLog] = useState<PointsLogRow[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
@@ -70,7 +73,18 @@ export function Profile() {
|
||||
|
||||
return (
|
||||
<section className="screen">
|
||||
<div className="h1">Profile</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 16 }}>
|
||||
<div className="h1" style={{ marginBottom: 0 }}>Profile</div>
|
||||
<img
|
||||
src={`/manfred/${manfredPose}.webp`}
|
||||
alt="Manfred"
|
||||
title="Manfred"
|
||||
data-testid="profile-manfred"
|
||||
width={76}
|
||||
height={76}
|
||||
style={{ objectFit: 'contain', flexShrink: 0 }}
|
||||
/>
|
||||
</div>
|
||||
<div className="card" style={{ textAlign: 'center' }}>
|
||||
<Avatar name={contact.full_name} id={contact.email} size={72} fs={26} />
|
||||
<div className="h2" style={{ marginTop: 10 }}>{contact.full_name}</div>
|
||||
|
||||
Reference in new issue
Block a user