import { useEffect, useState } from 'react' import Link from 'next/link' import { RecentComments } from '@waline/client' import { siteConfig } from '@/lib/config' /** * @see https://waline.js.org/guide/get-started.html * @param {*} props * @returns */ const NextRecentComments = (props) => { const [comments, updateComments] = useState([]) const [onLoading, changeLoading] = useState(true) useEffect(() => { RecentComments({ serverURL: siteConfig('COMMENT_WALINE_SERVER_URL'), count: 5 }).then(({ comments }) => { changeLoading(false) updateComments(comments) }) }, []) return <> {onLoading &&