You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. 'use client'
  2. import Doc from '@/app/components/develop/doc'
  3. import Loading from '@/app/components/base/loading'
  4. import ApiServer from '@/app/components/develop/ApiServer'
  5. import { useStore as useAppStore } from '@/app/components/app/store'
  6. type IDevelopMainProps = {
  7. appId: string
  8. }
  9. const DevelopMain = ({ appId }: IDevelopMainProps) => {
  10. const appDetail = useAppStore(state => state.appDetail)
  11. if (!appDetail) {
  12. return (
  13. <div className='flex h-full items-center justify-center bg-background-default'>
  14. <Loading />
  15. </div>
  16. )
  17. }
  18. return (
  19. <div className='relative flex h-full flex-col overflow-hidden'>
  20. <div className='flex shrink-0 items-center justify-between border-b border-solid border-b-divider-regular px-6 py-2'>
  21. <div className='text-lg font-medium text-text-primary'></div>
  22. <ApiServer apiBaseUrl={appDetail.api_base_url} appId={appId} />
  23. </div>
  24. <div className='grow overflow-auto px-4 py-4 sm:px-10'>
  25. <Doc appDetail={appDetail} />
  26. </div>
  27. </div>
  28. )
  29. }
  30. export default DevelopMain