generated from nhcarrigan/template
feat: add profile editing (bio, display name, stat visibility)
This commit is contained in:
@@ -5,9 +5,15 @@ interface ResourceBarProps {
|
||||
resources: Resource;
|
||||
prestigeCount: number;
|
||||
profileUrl: string;
|
||||
onEditProfile: () => void;
|
||||
}
|
||||
|
||||
export const ResourceBar = ({ resources, prestigeCount, profileUrl }: ResourceBarProps): React.JSX.Element => (
|
||||
export const ResourceBar = ({
|
||||
resources,
|
||||
prestigeCount,
|
||||
profileUrl,
|
||||
onEditProfile,
|
||||
}: ResourceBarProps): React.JSX.Element => (
|
||||
<header className="resource-bar">
|
||||
<div className="resource">
|
||||
<span className="resource-icon">🪙</span>
|
||||
@@ -34,14 +40,24 @@ export const ResourceBar = ({ resources, prestigeCount, profileUrl }: ResourceBa
|
||||
⭐ Prestige {prestigeCount}
|
||||
</div>
|
||||
)}
|
||||
<a
|
||||
className="profile-link-button"
|
||||
href={profileUrl}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
title="View your public profile"
|
||||
>
|
||||
👤 Profile
|
||||
</a>
|
||||
<div className="profile-buttons">
|
||||
<a
|
||||
className="profile-link-button"
|
||||
href={profileUrl}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
title="View your public profile"
|
||||
>
|
||||
👤 Profile
|
||||
</a>
|
||||
<button
|
||||
className="profile-edit-button"
|
||||
onClick={onEditProfile}
|
||||
title="Edit your profile"
|
||||
type="button"
|
||||
>
|
||||
✏️
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user