Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Avatar Images on Profile Page #220

Merged
merged 6 commits into from
May 22, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions routes/account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,21 @@ function Row(props: RowProps) {

export default function AccountPage(props: PageProps<AccountState>) {
const action = props.data.user.isSubscribed ? "Manage" : "Upgrade";
const hasResetPassword = new URL(props.url).searchParams.get(
"has_reset_password",
);

return (
<>
<Head title="Account" href={props.url.href} />
<Layout session={props.data.sessionId}>
<div class="max-w-lg m-auto w-full flex-1 p-4 flex flex-col justify-center">
<img
src={props.data.user?.avatarUrl}
alt="User Avatar"
crossOrigin="anonymous"
iuioiua marked this conversation as resolved.
Show resolved Hide resolved
class="max-w-[50%] self-center rounded-full aspect-square mb-4 md:mb-6"
/>
<h1 class="text-3xl mb-4">
<strong>Account</strong>
</h1>
{hasResetPassword && (
<div class={`${NOTICE_STYLES} mb-4`}>
Your password has successfully been reset
</div>
)}
<ul>
<Row
title="Username"
Expand Down