import * as React from 'react';
import classNames from 'classnames';
import { FormattedMessage, useIntl } from 'react-intl';
import { Row, Col, Typography, Spin } from 'antd';
import { useSiteData } from './util';
import './RecommendPage.less';
const { Title, Paragraph } = Typography;
interface Recommend {
title?: string;
img?: string;
href?: string;
popularize?: boolean;
description?: string;
loading?: boolean;
}
interface RecommendBlockProps extends Recommend {
main?: boolean;
}
const RecommendBlock = ({
main,
title,
popularize,
description,
img,
href,
loading,
}: RecommendBlockProps) => {
return (
{
window?.gtag('event', '点击', {
event_category: '首页推广',
event_label: href,
});
}}
>
{popularize && (
)}
);
};
export default function RecommendPageo() {
const { locale } = useIntl();
const isZhCN = locale === 'zh-CN';
const list = useSiteData('recommendations', isZhCN ? 'cn' : 'en');
const isLoading = !list;
console.log(list);
return (
);
}