/* eslint-disable style/multiline-ternary */ 'use client' import type { FC } from 'react' import { RiCloseLine } from '@remixicon/react' import * as React from 'react' import { useState } from 'react' import Loading from '@/app/components/base/loading' import Modal from '@/app/components/base/modal/index' import { useGetTryAppInfo } from '@/service/use-try-app' import Button from '../../base/button' import App from './app' import AppInfo from './app-info' import Preview from './preview' import Tab, { TypeEnum } from './tab' type Props = { appId: string category?: string onClose: () => void onCreate: () => void } const TryApp: FC = ({ appId, category, onClose, onCreate, }) => { const [type, setType] = useState(TypeEnum.TRY) const { data: appDetail, isLoading } = useGetTryAppInfo(appId) return ( {isLoading ? (
) : (
{/* Main content */}
{type === TypeEnum.TRY ? : }
)}
) } export default React.memo(TryApp)