import Layout from "@/layouts/main"; import Main from "@/components/pages/blog"; import { GetStaticProps } from "next"; import datasquirel from "@moduletrace/datasquirel"; import { DSQL_TBENME_BLOG_POSTS, PagePropsType } from "@/types"; import { APIResponseObject } from "@moduletrace/datasquirel/dist/package-shared/types"; export default function BlogPage() { return (
); } export const getStaticProps: GetStaticProps = async (ctx) => { const blogPosts: APIResponseObject = await datasquirel.crud({ action: "get", table: "blog_posts", query: { order: { field: "id", strategy: "DESC", }, }, }); return { props: { blogPosts: blogPosts.payload || null, }, revalidate: 3600, }; };