| import React from "react"; | |||||
| import React from 'react' | |||||
| import type { FC } from 'react' | import type { FC } from 'react' | ||||
| import GA, { GaType } from '@/app/components/base/ga' | import GA, { GaType } from '@/app/components/base/ga' | ||||
| children: React.ReactNode | children: React.ReactNode | ||||
| }> = ({ children }) => { | }> = ({ children }) => { | ||||
| return ( | return ( | ||||
| <div className="overflow-x-auto"> | |||||
| <div className="w-screen h-screen min-w-[300px]"> | |||||
| <GA gaType={GaType.webapp} /> | |||||
| {children} | |||||
| </div> | |||||
| <div className="min-w-[300px]"> | |||||
| <GA gaType={GaType.webapp} /> | |||||
| {children} | |||||
| </div> | </div> | ||||
| ) | ) | ||||
| } | } | ||||
| export default Layout | |||||
| export default Layout |
| return <Loading type='app' /> | return <Loading type='app' /> | ||||
| return ( | return ( | ||||
| <div className='bg-gray-100'> | |||||
| <div className='bg-gray-100 flex w-full h-full'> | |||||
| {!isInstalledApp && ( | {!isInstalledApp && ( | ||||
| <Header | <Header | ||||
| title={siteInfo.title} | title={siteInfo.title} | ||||
| <div | <div | ||||
| className={cn( | className={cn( | ||||
| 'flex rounded-t-2xl bg-white overflow-hidden', | |||||
| 'flex rounded-t-2xl bg-white overflow-hidden h-full w-full', | |||||
| isInstalledApp && 'rounded-b-2xl', | isInstalledApp && 'rounded-b-2xl', | ||||
| )} | )} | ||||
| style={isInstalledApp | style={isInstalledApp | ||||
| )} | )} | ||||
| {/* main */} | {/* main */} | ||||
| <div className={cn( | <div className={cn( | ||||
| isInstalledApp ? s.installedApp : 'h-[calc(100vh_-_3rem)]', | |||||
| isInstalledApp ? s.installedApp : '', | |||||
| 'flex-grow flex flex-col overflow-y-auto', | 'flex-grow flex flex-col overflow-y-auto', | ||||
| ) | ) | ||||
| }> | }> |
| <div | <div | ||||
| className={ | className={ | ||||
| cn( | cn( | ||||
| (isInstalledApp || isUniversalChat) ? 'tablet:h-[calc(100vh_-_74px)]' : 'tablet:h-[calc(100vh_-_3rem)]', | |||||
| (isInstalledApp || isUniversalChat) ? 'tablet:h-[calc(100vh_-_74px)]' : '', | |||||
| 'shrink-0 flex flex-col bg-white pc:w-[244px] tablet:w-[192px] mobile:w-[240px] border-r border-gray-200 mobile:h-screen', | 'shrink-0 flex flex-col bg-white pc:w-[244px] tablet:w-[192px] mobile:w-[240px] border-r border-gray-200 mobile:h-screen', | ||||
| ) | ) | ||||
| } | } |
| <div className={'flex bg-white overflow-hidden'}> | <div className={'flex bg-white overflow-hidden'}> | ||||
| <div className={cn( | <div className={cn( | ||||
| isInstalledApp ? s.installedApp : 'h-[calc(100vh_-_3rem)]', | |||||
| isInstalledApp ? s.installedApp : '', | |||||
| 'flex-grow flex flex-col overflow-y-auto', | 'flex-grow flex flex-col overflow-y-auto', | ||||
| ) | ) | ||||
| }> | }> |