feat(WEB-169): get profile data from API
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
export default function Default() {
|
||||
return null
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default function Default() {
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import type { ErrorPage } from "@/types/next/error"
|
||||
|
||||
export default function MyPageOverviewError({ error }: ErrorPage) {
|
||||
console.error(error)
|
||||
return <h1>Error happened, overview</h1>
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import styles from "./page.module.css"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function MyPage({ params }: PageArgs<LangParams>) {
|
||||
export default async function MyPageOverview({ params }: PageArgs<LangParams>) {
|
||||
const user = await serverClient().user.get()
|
||||
return (
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import EditProfile from "@/components/MyProfile/Profile/Edit"
|
||||
|
||||
export default async function EditProfileSlot() {
|
||||
const user = await serverClient().user.get()
|
||||
return <EditProfile user={user} />
|
||||
export default function EditProfileSlot() {
|
||||
return <EditProfile />
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import type { ErrorPage } from "@/types/next/error"
|
||||
|
||||
export default function ProfileError({ error }: ErrorPage) {
|
||||
console.error(error)
|
||||
return <h1>Error happened, Profile</h1>
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Profile from "@/components/MyProfile/Profile"
|
||||
|
||||
export default async function ProfileInfo() {
|
||||
const user = await serverClient().user.get()
|
||||
return <Profile user={user} />
|
||||
export default function ProfileInfo() {
|
||||
return <Profile />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user