| @@ -1,6 +1,6 @@ | |||
| import React, { useState } from 'react' | |||
| import React from 'react' | |||
| import Link from 'next/link' | |||
| import { RiCloseLine, RiDiscordFill, RiGithubFill } from '@remixicon/react' | |||
| import { RiDiscordFill, RiGithubFill } from '@remixicon/react' | |||
| import { useTranslation } from 'react-i18next' | |||
| type CustomLinkProps = { | |||
| @@ -26,24 +26,9 @@ const CustomLink = React.memo(({ | |||
| const Footer = () => { | |||
| const { t } = useTranslation() | |||
| const [isVisible, setIsVisible] = useState(true) | |||
| const handleClose = () => { | |||
| setIsVisible(false) | |||
| } | |||
| if (!isVisible) | |||
| return null | |||
| return ( | |||
| <footer className='relative shrink-0 grow-0 px-12 py-2'> | |||
| <button | |||
| onClick={handleClose} | |||
| className='absolute right-2 top-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full transition-colors duration-200 ease-in-out hover:bg-components-main-nav-nav-button-bg-active' | |||
| aria-label="Close footer" | |||
| > | |||
| <RiCloseLine className='h-4 w-4 text-text-tertiary hover:text-text-secondary' /> | |||
| </button> | |||
| <h3 className='text-gradient text-xl font-semibold leading-tight'>{t('app.join')}</h3> | |||
| <p className='system-sm-regular mt-1 text-text-tertiary'>{t('app.communityIntro')}</p> | |||
| <div className='mt-3 flex items-center gap-2'> | |||
| @@ -1,14 +1,11 @@ | |||
| 'use client' | |||
| import { useEducationInit } from '@/app/education-apply/hooks' | |||
| import { useGlobalPublicStore } from '@/context/global-public-context' | |||
| import List from './list' | |||
| import Footer from './footer' | |||
| import useDocumentTitle from '@/hooks/use-document-title' | |||
| import { useTranslation } from 'react-i18next' | |||
| const Apps = () => { | |||
| const { t } = useTranslation() | |||
| const { systemFeatures } = useGlobalPublicStore() | |||
| useDocumentTitle(t('common.menus.apps')) | |||
| useEducationInit() | |||
| @@ -16,9 +13,6 @@ const Apps = () => { | |||
| return ( | |||
| <div className='relative flex h-0 shrink-0 grow flex-col overflow-y-auto bg-background-body'> | |||
| <List /> | |||
| {!systemFeatures.branding.enabled && ( | |||
| <Footer /> | |||
| )} | |||
| </div > | |||
| ) | |||
| } | |||
| @@ -32,6 +32,8 @@ import TagFilter from '@/app/components/base/tag-management/filter' | |||
| import CheckboxWithLabel from '@/app/components/datasets/create/website/base/checkbox-with-label' | |||
| import dynamic from 'next/dynamic' | |||
| import Empty from './empty' | |||
| import Footer from './footer' | |||
| import { useGlobalPublicStore } from '@/context/global-public-context' | |||
| const TagManagementModal = dynamic(() => import('@/app/components/base/tag-management'), { | |||
| ssr: false, | |||
| @@ -66,6 +68,7 @@ const getKey = ( | |||
| const List = () => { | |||
| const { t } = useTranslation() | |||
| const { systemFeatures } = useGlobalPublicStore() | |||
| const router = useRouter() | |||
| const { isCurrentWorkspaceEditor, isCurrentWorkspaceDatasetOperator } = useAppContext() | |||
| const showTagManagementModal = useTagStore(s => s.showTagManagementModal) | |||
| @@ -229,6 +232,9 @@ const List = () => { | |||
| <span className="system-xs-regular">{t('app.newApp.dropDSLToCreateApp')}</span> | |||
| </div> | |||
| )} | |||
| {!systemFeatures.branding.enabled && ( | |||
| <Footer /> | |||
| )} | |||
| <CheckModal /> | |||
| <div ref={anchorRef} className='h-0'> </div> | |||
| {showTagManagementModal && ( | |||