Files
next-admin-mojrian/src/app/(index)/code/(list_code)/layout.tsx
T
2026-06-13 08:15:04 +03:30

44 lines
1.2 KiB
TypeScript

'use client'
import {Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow} from "@/components/ui/table";
import {IProject} from "@/types/project";
import {numberWithCommas} from "@/utils/helper";
import {useRouter} from "next/navigation";
import Link from "next/link";
export default function CodeLayout({children,}: { children: React.ReactNode }) {
const router = useRouter()
const changePage = (e:any)=>{
const page_name = e.target.value
router.push(`/projects/${page_name}`)
}
return (
<div className="w-full md:w-[60%] lg:w-[75%] m-auto " dir="rtl">
<div className="bg-white rounded-md p-4 flex flex-row mt-7 mb-3 justify-between items-center">
<div>
<p>لیست کدهای ثبت پروژه </p>
</div>
<div className={'bg-red-800 text-white rounded-xl px-4 py-1'}>
<Link href={'/code/new'}>ایجاد کد</Link>
</div>
</div>
<div className="mt-0">
<div className="flex flex-row gap-x-8 bg-white rounded p-4">
{children}
</div>
</div>
</div>
)
}