all pages is dynamic now
This commit is contained in:
1 parent
dc11b6c9b3
commit
5a2bb48856
9 files changed
+301
-995
No files matched your search
+80
-2
@@ -1,3 +1,81 @@
|
||||
export type {
|
||||
// تعریف نوع Author
|
||||
export type AuthorType = {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
}
|
||||
// تعریف نوع Category
|
||||
export type CategoryType = {
|
||||
id: number;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string;
|
||||
short_description: string;
|
||||
image: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type CategoriesListType = { data: CategoryType[] };
|
||||
|
||||
// تعریف نوع Tag
|
||||
export type TagType = {
|
||||
id: number;
|
||||
name: string;
|
||||
slug: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
// تعریف نوع PostItemType با استفاده از انواع جداگانه
|
||||
export type PostType = {
|
||||
id: number;
|
||||
title: string;
|
||||
slug: string;
|
||||
excerpt: string;
|
||||
body: string;
|
||||
author: AuthorType;
|
||||
category: CategoryType;
|
||||
tags: TagType[]; // اصلاح شده به آرایه از TagType
|
||||
featured_image: string;
|
||||
views: number;
|
||||
likes: number;
|
||||
published_at: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type categorySlugPropsType = {
|
||||
params: { categorySlug: string };
|
||||
};
|
||||
|
||||
export type PaginationType = {
|
||||
total: number;
|
||||
per_page: number;
|
||||
current_page: number;
|
||||
last_page: number;
|
||||
from: number;
|
||||
to: number;
|
||||
};
|
||||
|
||||
export type CategoryDataType = {
|
||||
category: CategoryType;
|
||||
posts: PostType[];
|
||||
pagination: PaginationType;
|
||||
};
|
||||
|
||||
export type FilteredPostsPagepropsType = {
|
||||
params: { filter: string };
|
||||
};
|
||||
|
||||
export type PostSlugPagepropsType = {
|
||||
params: { postSlug: string };
|
||||
};
|
||||
|
||||
export type PostSlugPagePostType = {
|
||||
post: PostType;
|
||||
related_posts: PostType[];
|
||||
};
|
||||
Reference in new issue
Block a user