返回 AiToEarn
SupportPlat.tsx
1 import { ForwardedRef, forwardRef, memo } from 'react';
2 import { PubType } from '../../../../../commont/publish/PublishEnum';
3 import styles from './supportPlat.module.scss';
4 import { AccountPlatInfoMap } from '../../../account/comment';
5
6 export interface ISupportPlatRef {}
7
8 export interface ISupportPlatProps {
9 pubType: PubType;
10 style?: React.CSSProperties;
11 }
12
13 const SupportPlat = memo(
14 forwardRef(
15 (
16 { pubType, style }: ISupportPlatProps,
17 ref: ForwardedRef<ISupportPlatRef>,
18 ) => {
19 return (
20 <div
21 className={`${styles.supportPlat} ${pubType !== PubType.VIDEO && styles.supportPlatBg}`}
22 style={style}
23 >
24 <div className="supportPlatBg-title">支持平台</div>
25 <div className="supportPlat-tip">
26 <p className="supportPlat-tip--line" />
27 <p className="supportPlat-tip-text">支持以下平台</p>
28 <p className="supportPlat-tip--line" />
29 </div>
30 <ul className="supportPlat-con">
31 {Array.from(AccountPlatInfoMap).map(([k, v]) => {
32 if (!v.pubTypes.has(pubType)) return null;
33 return (
34 <li key={v.name}>
35 <img src={v.icon} />
36 </li>
37 );
38 })}
39 </ul>
40 </div>
41 );
42 },
43 ),
44 );
45 SupportPlat.displayName = 'SupportPlat';
46
47 export default SupportPlat;
48
48 lines Plain Text