updated public profile view
This commit is contained in:
@@ -599,6 +599,7 @@ const normalizePublicBirdProfile = (row: BirdRow) => ({
|
|||||||
id: row.id,
|
id: row.id,
|
||||||
workspaceId: row.workspace_id,
|
workspaceId: row.workspace_id,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
|
favoriteSnack: row.favorite_snack,
|
||||||
gender: row.gender,
|
gender: row.gender,
|
||||||
dateOfBirth: row.date_of_birth,
|
dateOfBirth: row.date_of_birth,
|
||||||
photoDataUrl: getBirdPhotoUrl(row),
|
photoDataUrl: getBirdPhotoUrl(row),
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ type PublicBirdProfile = {
|
|||||||
id: string;
|
id: string;
|
||||||
workspaceId: number;
|
workspaceId: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
favoriteSnack: string | null;
|
||||||
gender: BirdGender;
|
gender: BirdGender;
|
||||||
dateOfBirth: string | null;
|
dateOfBirth: string | null;
|
||||||
photoDataUrl: string | null;
|
photoDataUrl: string | null;
|
||||||
@@ -3587,6 +3588,7 @@ function App() {
|
|||||||
return (
|
return (
|
||||||
<main className="auth-shell public-profile-shell">
|
<main className="auth-shell public-profile-shell">
|
||||||
<section className="panel public-profile-card">
|
<section className="panel public-profile-card">
|
||||||
|
<img className="public-profile-logo" src={flockPalLandingArt} alt="FlockPal" />
|
||||||
{publicProfileLoading || authLoading ? (
|
{publicProfileLoading || authLoading ? (
|
||||||
<p>Loading bird profile...</p>
|
<p>Loading bird profile...</p>
|
||||||
) : publicProfileError || !publicProfile ? (
|
) : publicProfileError || !publicProfile ? (
|
||||||
@@ -3609,6 +3611,10 @@ function App() {
|
|||||||
<span>Hatch Day</span>
|
<span>Hatch Day</span>
|
||||||
<strong>{formatDate(publicProfile.dateOfBirth)}</strong>
|
<strong>{formatDate(publicProfile.dateOfBirth)}</strong>
|
||||||
</article>
|
</article>
|
||||||
|
<article className="summary-card">
|
||||||
|
<span>Favorite treat</span>
|
||||||
|
<strong>{publicProfile.favoriteSnack || 'Not recorded'}</strong>
|
||||||
|
</article>
|
||||||
{publicProfileWorkspaceMembership ? (
|
{publicProfileWorkspaceMembership ? (
|
||||||
<button className="primary-button" onClick={handleOpenPublicProfileBird} type="button">
|
<button className="primary-button" onClick={handleOpenPublicProfileBird} type="button">
|
||||||
Open full profile
|
Open full profile
|
||||||
|
|||||||
@@ -230,6 +230,12 @@ textarea {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.public-profile-logo {
|
||||||
|
width: min(220px, 70%);
|
||||||
|
height: auto;
|
||||||
|
filter: drop-shadow(0 10px 18px rgba(86, 63, 34, 0.12));
|
||||||
|
}
|
||||||
|
|
||||||
.public-profile-photo {
|
.public-profile-photo {
|
||||||
width: min(260px, 100%);
|
width: min(260px, 100%);
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user