refactoring
This commit is contained in:
@@ -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>
|
||||
}
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user