mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 06:19:45 +00:00
Развел карточки и пост в разные типы
This commit is contained in:
1 parent
de1e3beee3
commit
64b797bd38
3 files changed
+16
-13
No files matched your search
Vendored
+14
-9
@@ -276,21 +276,26 @@ declare namespace App {
|
||||
export interface WpPost {
|
||||
id: number;
|
||||
title: string;
|
||||
categories?: string[];
|
||||
tag:? number;
|
||||
content?: ParsedContent[];
|
||||
preview?: string | null;
|
||||
previewText?: string;
|
||||
categories: string[];
|
||||
}
|
||||
|
||||
export interface LabPost extends WpPost {
|
||||
export interface WpPostPage extends WpPost {
|
||||
content: ParsedContent[];
|
||||
tag: number;
|
||||
}
|
||||
|
||||
export interface Card extends WpPost {
|
||||
preview: string | null;
|
||||
}
|
||||
|
||||
export interface LabCard extends Card {
|
||||
previewText: string;
|
||||
}
|
||||
|
||||
export interface PostsResult {
|
||||
projects: Record<number, WpPost>;
|
||||
labs: Record<number, LabPost>;
|
||||
other: WpPost[];
|
||||
projects: Record<number, Card>;
|
||||
labs: Record<number, LabCard>;
|
||||
other: WpPostPage[];
|
||||
}
|
||||
|
||||
export interface MediaItem {
|
||||
|
||||
@@ -22,9 +22,7 @@ export function CategoryPage({ category }: CategoryPageProps) {
|
||||
return (
|
||||
<>
|
||||
{categoryPosts.map((post) => (
|
||||
<WpPost key={post.id} post={post}>
|
||||
<div className="btn">Показать еще</div>
|
||||
</WpPost>
|
||||
<WpPost key={post.id} post={post} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -6,7 +6,7 @@ import { PageContent, PageHeader } from "@/widgets/WpPost";
|
||||
import { App } from "@/shared/types/app";
|
||||
|
||||
interface WpPostProps {
|
||||
post: App.WpPost;
|
||||
post: App.WpPostPage;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user