change data articles and create head and detail page item blog

This commit is contained in:
Ehsan
2024-07-19 22:05:53 +03:30
parent 03e3cc3177
commit 57d33a532c
8 changed files with 94 additions and 17 deletions
+8 -2
View File
@@ -1,10 +1,16 @@
import BlogPage from '@/components/blog';
import Layout from '@/components/layout';
import articles from '@/data/articles.json';
function Blog({ params: { slug } }) {
const article = articles.find(item => item.id === +slug);
function Blog() {
return (
<Layout title='وبلاگ' name='blog'>
<BlogPage />
<BlogPage
article={article}
/>
</Layout>
)
}