24 lines
780 B
TypeScript
24 lines
780 B
TypeScript
import Image from "next/image";
|
|
import { sharedFunction } from '@male/shared';
|
|
import Link from "next/link";
|
|
import { sites } from "../../_config/sites";
|
|
import { TestForm } from "../../components/test/testForm";
|
|
import { CategoryForm } from "../../components/category/categroy.form";
|
|
import { categoryFindAll } from "../../actions/category.actions";
|
|
|
|
console.log(sharedFunction)
|
|
|
|
export default async function Home() {
|
|
const cats = await categoryFindAll();
|
|
|
|
|
|
return (
|
|
<div className="h-screen">
|
|
{cats.map((cat)=>(<div key={cat._id}>{cat.name}</div>))}
|
|
<CategoryForm></CategoryForm>
|
|
<Link className="cursor-pointer p-2 border-1 border-sky-500 bg-sky-500 text-white rounded-full m-1 hover:bg-sky-700 " href={sites.main.url}>Home</Link>
|
|
|
|
</div>
|
|
);
|
|
}
|