Skip to content

Commit

Permalink
refactor: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed Nov 15, 2023
1 parent f292f88 commit 259e755
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 36 deletions.
14 changes: 7 additions & 7 deletions src/app/[lang]/(protected)/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { getServerSession } from "next-auth"
import DeleteAccountButton from "@/components/auth/delete-account-button"
import SignoutButton from "@/components/auth/sign-out-button"
import VerifyEmailButton from "@/components/auth/verify-email-button"
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import ProfileDetails from "@/components/profile/profile-details"
import UserActiveSessions from "@/components/profile/sessions/user-active-sessions"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { nextAuthOptions } from "@/lib/auth"
import { getDictionary } from "@/lib/langs"
import { Locale } from "i18n-config"
import SeeDetailsToggle from "./see-details-toggle"

export default async function Profile({
params: { lang },
Expand All @@ -30,16 +31,15 @@ export default async function Profile({
<pre className="mt-2 w-[40rem] max-w-full overflow-auto rounded bg-muted p-2">
{JSON.stringify(session, null, 2)}
</pre>
</CardContent>
<CardFooter>
<div className="m-auto flex flex-col items-center space-y-2 md:mr-0 md:w-full md:flex-row md:justify-end md:space-x-2 md:space-y-0">
<div className="mt-4 flex flex-col items-center space-y-2 md:mr-0 md:w-full md:flex-row md:justify-end md:space-x-2 md:space-y-0">
{session && <VerifyEmailButton session={session} dictionary={dictionary} />}
<DeleteAccountButton dictionary={dictionary}>{dictionary.deleteAccount}</DeleteAccountButton>
<SignoutButton dictionary={dictionary}>{dictionary.signOut}</SignoutButton>
</div>
</CardFooter>
<ProfileDetails dictionary={dictionary} />
<UserActiveSessions dictionary={dictionary} session={session} />
</CardContent>
</Card>
<SeeDetailsToggle dictionary={dictionary} session={session} />
</div>
</main>
)
Expand Down
29 changes: 0 additions & 29 deletions src/app/[lang]/(protected)/profile/see-details-toggle.tsx

This file was deleted.

0 comments on commit 259e755

Please sign in to comment.