import { Checkbox, Col, Row } from "antd"; import { ContentPreview } from "../../../Components/EmbedContent/ContentPreview"; import { LICENSES } from "../../../constants"; import { NLView } from "../../../types"; import { ProgressButton } from "../../../Components/ProgressButton"; import isEmpty from "lodash/isEmpty"; export type LicenseProps = { name: string; value: string }; const PostCreateInfo: NLView<{ selectedLicense: LicenseProps; setSelectedLicense: React.Dispatch>; setIsLicense: React.Dispatch>; isLicense: boolean; mintConfirmationOpen: boolean; ncoBalance: number; content: string; contentType: string; embedSwitch: boolean; isLoading: boolean; }> = ({ selectedLicense, setSelectedLicense, isLicense, setIsLicense, mintConfirmationOpen, content, embedSwitch, contentType, isLoading, ncoBalance, }) => { return ( <> {isLicense ? ( ) : !mintConfirmationOpen ? (
{embedSwitch && contentType === "text/plain" && !isEmpty(content) && !isLoading && } Share
) : ( false )} ); }; const AddLicense: NLView<{ selectedLicense: LicenseProps; setSelectedLicense: React.Dispatch>; setIsLicense: React.Dispatch>; isLicense: boolean; }> = ({ selectedLicense, setSelectedLicense, isLicense, setIsLicense }) => { return ( <>

Add license

{LICENSES.map((license) => ( ))}
); }; const LicenceContent: NLView<{ description: string; shortcut: string; type: string; link: string; isLicense: boolean; setSelectedLicense: React.Dispatch>; setIsLicense: React.Dispatch>; }> = ({ type, description, shortcut, link, setSelectedLicense, setIsLicense, isLicense }) => ( <> { setSelectedLicense({ name: type, value: shortcut }); setIsLicense(!isLicense); }} />

({shortcut}) {type}

{description}

{link}

); export default PostCreateInfo;