| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  | 'use client' | 
					
						
							|  |  |  | import Doc from '@/app/components/develop/doc' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import Loading from '@/app/components/base/loading' | 
					
						
							| 
									
										
										
										
											2025-04-15 16:13:18 +08:00
										 |  |  | import ApiServer from '@/app/components/develop/ApiServer' | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  | import { useStore as useAppStore } from '@/app/components/app/store' | 
					
						
							| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | type IDevelopMainProps = { | 
					
						
							|  |  |  |   appId: string | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-11 11:08:32 +08:00
										 |  |  | const DevelopMain = ({ appId }: IDevelopMainProps) => { | 
					
						
							| 
									
										
										
										
											2024-04-24 04:07:28 +00:00
										 |  |  |   const appDetail = useAppStore(state => state.appDetail) | 
					
						
							| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |   if (!appDetail) { | 
					
						
							|  |  |  |     return ( | 
					
						
							| 
									
										
										
										
											2025-04-15 16:13:18 +08:00
										 |  |  |       <div className='flex h-full items-center justify-center bg-background-default'> | 
					
						
							| 
									
										
										
										
											2024-04-08 18:51:46 +08:00
										 |  |  |         <Loading /> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  |   return ( | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |     <div className='relative flex h-full flex-col overflow-hidden'> | 
					
						
							| 
									
										
										
										
											2025-04-15 16:13:18 +08:00
										 |  |  |       <div className='flex shrink-0 items-center justify-between border-b border-solid border-b-divider-regular px-6 py-2'> | 
					
						
							|  |  |  |         <div className='text-lg font-medium text-text-primary'></div> | 
					
						
							| 
									
										
										
										
											2025-04-16 23:07:05 +08:00
										 |  |  |         <ApiServer apiBaseUrl={appDetail.api_base_url} appId={appId} /> | 
					
						
							| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  |       </div> | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |       <div className='grow overflow-auto px-4 py-4 sm:px-10'> | 
					
						
							| 
									
										
										
										
											2023-05-15 08:51:32 +08:00
										 |  |  |         <Doc appDetail={appDetail} /> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default DevelopMain |