Skip to content

Commit

Permalink
feat: show avatar in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed Jan 24, 2024
1 parent 7a7300b commit 556ebe3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/app/settings/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Avatar, Link } from '@nextui-org/react'
import { redirect } from 'next/navigation'

import SettingsForm from '@/app/settings/profile/_components/settings-form/settings-form'
import SettingsFormInputText from '@/app/settings/profile/_components/settings-form/settings-form-input-text'
import UserResponse from '@/core/user/dto/responses/user.response'
import { findUser } from '@/core/user/infrastructure/actions/find-user'
import { auth } from '@/lib/auth/auth'
import gravatar from '@/lib/utils/gravatar'

export default async function Page() {
const session = await auth()
Expand All @@ -18,6 +20,20 @@ export default async function Page() {
return (
<>
<div className="flex flex-col gap-y-4">
<SettingsForm title="Imagen de perfil">
<div className="flex justify-between">
<div className="flex-1">
<p>Esta es tu imagen de perfil.</p>
<p>
Por el momento solo es posible cambiarla a través de{' '}
<Link href="https://gravatar.com">gravatar</Link> y asociando el
mismo correo con el que has iniciado sesión.
</p>
</div>
<Avatar size="lg" src={user.image || gravatar(user.email)} />
</div>
</SettingsForm>

<SettingsForm title="Nombre visible">
<div>Introduce tu nombre completo o con el que más se te conoce.</div>
<SettingsFormInputText
Expand Down

0 comments on commit 556ebe3

Please sign in to comment.