Portofolio
#feat - Create porto - Edit Porto - Upload gambar background profile - List user - Search user ## No issuue
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
||||
import { AppShell } from "@mantine/core";
|
||||
|
||||
export default function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<UploadFotoProfileLayout profileId={params.id}>{children}</UploadFotoProfileLayout>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { UploadFotoProfile } from "@/app_modules/katalog/profile";
|
||||
import { unsealData } from "iron-session";
|
||||
import { cookies } from "next/headers";
|
||||
import yaml from "yaml";
|
||||
import fs from "fs";
|
||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page() {
|
||||
const c = cookies().get("ssn");
|
||||
const usr = JSON.parse(
|
||||
await unsealData(c?.value as string, {
|
||||
password: config.server.password,
|
||||
})
|
||||
);
|
||||
|
||||
const imageUrl = await funGetUserProfile(usr.id).then(
|
||||
(res) => res?.Profile?.ImageProfile?.url
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<UploadFotoProfile imageUrl={imageUrl} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
8
src/app/dev/profile/upload/background/[id]/layout.tsx
Normal file
8
src/app/dev/profile/upload/background/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import LayoutProfile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background/layout";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||
return<>
|
||||
<LayoutProfile_UpdateFotoBackground>{children}</LayoutProfile_UpdateFotoBackground>
|
||||
</>
|
||||
}
|
||||
12
src/app/dev/profile/upload/background/[id]/page.tsx
Normal file
12
src/app/dev/profile/upload/background/[id]/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile"
|
||||
import Profile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background"
|
||||
|
||||
export default async function Page({params}:{params: {id: string}}) {
|
||||
let profileId = params.id
|
||||
const dataProfile = await Profile_getOneById(profileId)
|
||||
|
||||
return <>
|
||||
<Profile_UpdateFotoBackground dataProfile={dataProfile as any}/>
|
||||
</>
|
||||
|
||||
}
|
||||
9
src/app/dev/profile/upload/foto/[id]/layout.tsx
Normal file
9
src/app/dev/profile/upload/foto/[id]/layout.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
||||
let profileId = params.id
|
||||
return <>
|
||||
<UploadFotoProfileLayout profileId={profileId} >{children}</UploadFotoProfileLayout>
|
||||
</>
|
||||
}
|
||||
11
src/app/dev/profile/upload/foto/[id]/page.tsx
Normal file
11
src/app/dev/profile/upload/foto/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { UploadFotoProfile } from "@/app_modules/katalog/profile";
|
||||
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
let profileId = params.id
|
||||
const dataProfile = await Profile_getOneById(profileId)
|
||||
|
||||
return <>
|
||||
<UploadFotoProfile dataProfile={dataProfile as any}/>
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user