fix test error

This commit is contained in:
iamkun 2022-03-18 17:18:14 +08:00
parent f8dc201218
commit c43f6c0f25
2 changed files with 4 additions and 0 deletions

View File

@ -17,8 +17,10 @@ A basic comment with author, avatar, time and actions.
import React, { createElement, useState } from 'react';
import { Comment, Tooltip, Avatar } from 'antd';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import { DislikeOutlined, LikeOutlined, DislikeFilled, LikeFilled } from '@ant-design/icons';
dayjs.extend(relativeTime);
const Demo = () => {
const [likes, setLikes] = useState(0);
const [dislikes, setDislikes] = useState(0);

View File

@ -16,7 +16,9 @@ Displaying a series of comments using the `antd` List Component.
```jsx
import { Comment, Tooltip, List } from 'antd';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
dayjs.extend(relativeTime);
const data = [
{
actions: [<span key="comment-list-reply-to-0">Reply to</span>],