@@ -151,16 +151,18 @@ const AudioModelPage: NextPageWithLayout = () => { type={'Аудио'} linkBack={'/audio'} /> -
- {botParams && - botParams.tags.map((tag, index) => ( -
- + {desktop && ( +
+ {botParams && + botParams.tags.map((tag, index) => ( +
+ - {tag.title} -
- ))} -
+ {tag.title} +
+ ))} +
+ )} {desktop && ( @@ -142,16 +142,18 @@ const ImageModelPage: NextPageWithLayout = () => { type={'Изображения'} linkBack={'/images'} /> -
- {botParams && - botParams.tags.map((tag, index) => ( -
- + {desktop && ( +
+ {botParams && + botParams.tags.map((tag, index) => ( +
+ - {tag.title} -
- ))} -
+ {tag.title} +
+ ))} +
+ )} {desktop && ( @@ -149,16 +149,18 @@ const VideoModelPage: NextPageWithLayout = () => { type={'Видео'} linkBack={'/videos'} /> -
- {botParams && - botParams.tags.map((tag, index) => ( -
- + {desktop && ( +
+ {botParams && + botParams.tags.map((tag, index) => ( +
+ - {tag.title} -
- ))} -
+ {tag.title} +
+ ))} +
+ )} {desktop && ( @@ -238,16 +238,18 @@ const VoiceCloningModelPage: NextPageWithLayout = () => { type={'Клонирование голоса'} linkBack={'/voice-cloning'} /> -
- {botParams && - botParams.tags.map((tag, index) => ( -
- + {desktop && ( +
+ {botParams && + botParams.tags.map((tag, index) => ( +
+ - {tag.title} -
- ))} -
+ {tag.title} +
+ ))} +
+ )} {desktop && ( @@ -68,9 +68,7 @@ const Page: NextPageWithLayout = () => { const deleteMessageMemo = useCallback(deleteMessage, [currentChat, messages]) - const chatWindowHeight = desktop - ? '75vh' - : `calc(100dvh - ${(botParams?.tags ?? []).length === 0 ? '200px' : '285px'})` + const chatWindowHeight = desktop ? '75vh' : 'calc(100dvh - 200px)' const isBotReady = botParams !== null && botParams.slug === routeSlug && modelType === routeSlug const isContentLoading = !isBotReady || chatsLoading || messages === null @@ -256,15 +254,17 @@ const Page: NextPageWithLayout = () => {
- <div className={styles.tags}> - {botParams && - botParams.tags.map((tag, index) => ( - <div key={index} className={styles.tag}> - <SvgIcon width={23} height={23} url={tag.icon} className={styles.tag__icon} /> - <span className={styles.tag__text}>{tag.title}</span> - </div> - ))} - </div> + {desktop && ( + <div className={styles.tags}> + {botParams && + botParams.tags.map((tag, index) => ( + <div key={index} className={styles.tag}> + <SvgIcon width={23} height={23} url={tag.icon} className={styles.tag__icon} /> + <span className={styles.tag__text}>{tag.title}</span> + </div> + ))} + </div> + )} {desktop && <ChatsContainer desktop={desktop} modelType={modelType} />} {desktop && ( @@ -326,7 +326,7 @@ const Page: NextPageWithLayout<ChatBotPageProps> = () => { modelType={modelType} modelTitle={botParams?.title} currentVersion={version} - tags={botParams?.tags ?? []} + tags={desktop ? botParams?.tags ?? [] : []} inputValue={inputContent} onInputValueChange={setInputContent} predictedPrice={predictedPrice} @@ -345,9 +345,7 @@ const Page: NextPageWithLayout<ChatBotPageProps> = () => { padding: desktop ? (botParams?.blocked ? 2 : 2) : 1.25, paddingBlock: 1.5, width: '100%', - height: desktop - ? '75vh' - : `calc(100dvh - ${botParams?.tags && botParams?.tags.length == 0 ? '200px' : '240px'})`, + height: desktop ? '75vh' : 'calc(100dvh - 200px)', overflowY: 'auto', }} > @@ -65,7 +65,6 @@ function Chat<T>({ blocked, currentVersion, deviceOs, - tags, inputValue, onInputValueChange, predictedPrice, @@ -118,7 +117,7 @@ function Chat<T>({ paddingTop: 0, paddingBottom: 1.25, width: '100%', - height: desktop ? '75vh' : `calc(100dvh - ${tags.length == 0 ? '200px' : '285px'})`, + height: desktop ? '75vh' : 'calc(100dvh - 200px)', overflow: 'hidden', }} >