refactoring

This commit is contained in:
2024-06-08 06:13:38 +02:00
parent c2258abe04
commit 0c5f9eb74b
5 changed files with 2 additions and 115 deletions

View File

@@ -1,16 +0,0 @@
'use server'
import AdminPanel from "@/components/server/admin/adminPanel";
import { AuthProps } from "@/providers/providers";
import { ReactNode } from "react";
interface Props {
children?: ReactNode;
slug?: string;
}
export default async function ServerAdminPanel(props:Props){
return <AdminPanel slug={props.slug?props.slug:'home'}>{props.children}</AdminPanel>
}

View File

@@ -1,35 +0,0 @@
'use server'
import { ReactNode, useContext, useState } from "react";
import { AuthProps } from "@/providers/providers";
import SomeServerSubComponent from "@/components/server/admin/serverContextUserTest";
import Sidebar from "./views/sidebar";
import PostView from "./views/PostView";
interface Props {
children?: ReactNode;
// auth?: AuthProps;
slug?: string;
}
export default async function AdminPanel(props:Props){
const slug = props.slug ? props.slug : 'home'
return (
<div className="AdminPanelWrapper w-[100%] h-[100%] flex flex-row m-auto">
{/* <h1>Super Secret Admin Panel!</h1> */}
{/* <h2>this is where we use the context test:<SomeSubComponent></SomeSubComponent></h2> */}
{/* <SomeServerSubComponent></SomeServerSubComponent> */}
{/* <section> */}
{/* {props.children} */}
{/* <PostView></PostView> */}
{/* </section> */}
{props.children}
{/* <div>{JSON.stringify(props.auth)}</div> */}
</div>
)
}