import type { SiteInfo } from '@/models/share' import { cn } from '@langgenius/dify-ui/cn' import { Dialog, DialogClose, DialogContent } from '@langgenius/dify-ui/dialog' import { IconButton } from '@langgenius/dify-ui/icon-button' import * as React from 'react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' import { appDefaultIconBackground } from '@/config' type Props = Readonly<{ data?: SiteInfo isShow: boolean onClose: () => void }> const InfoModal = ({ isShow, onClose, data }: Props) => { const { t } = useTranslation() const [currentYear] = React.useState(() => new Date().getFullYear()) return ( { if (!open) onClose() }} > $['operation.close'], { ns: 'common' })} size="lg" className="absolute inset-e-6 top-6" > } />
{data?.title}
{data?.description}
{/* copyright */} {data?.copyright && (
Copyright © {currentYear} {data?.copyright}. All Rights Reserved.
)} {data?.custom_disclaimer &&
{data.custom_disclaimer}
}
) } export default InfoModal