NewTopics

Виджет с новыми темами (topics) из журнала (бывший форум) в LiveBar

Props

title

  • type: string
  • default: 'Темы журнала'

Заголовок блока

  • type: string
  • default: '/journal'

Куда ведет ссылка «Показать еще»

topics

  • type: NewTopicsTopic[]
  • required: true

Темы журнала

Types

export type NewTopicsTopic = {
  id: number;
  slug: string;
  topic: string;
  pinned: boolean;
  voting: boolean;
  postedAt: Date;
  commentsCount: number;
};

Test data

import { testTopic } from './topic/test-data';
import type { NewTopicsTopic } from './types';

export const testTitle = 'Test title';
export const testMoreLink = '/test-more-link';

export const testTopics: NewTopicsTopic[] = [
  { ...testTopic, id: 1 },
  { ...testTopic, id: 2 },
  { ...testTopic, id: 3 },
];
import type { NewTopicsTopic } from '../types';

export const testTopic: NewTopicsTopic = {
  id: 5809,
  topic: 'Технические работы – ноябрь 2022',
  pinned: true,
  voting: true,
  postedAt: new Date(1667284793000),
  commentsCount: 35,
  slug: '5809-tehnicheskie-raboty-noyabr-2022',
};