import styled from '@emotion/styled'; import { Link } from '@inertiajs/react'; import { route } from '@izzyjs/route/client'; import { useTranslation } from 'react-i18next'; import useActiveCollection from '~/hooks/use_active_collection'; import { appendCollectionId } from '~/lib/navigation'; import { fadeIn } from '~/styles/keyframes'; const NoCollectionStyle = styled.div({ minWidth: 0, display: 'flex', flex: 1, alignItems: 'center', justifyContent: 'center', flexDirection: 'column', animation: `${fadeIn} 0.3s both`, }); const Text = styled.p({ minWidth: 0, width: '100%', textAlign: 'center', textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', }); export function NoCollection() { const { t } = useTranslation('home'); return ( {t('select-collection')} {t('or-create-one')} ); } export function NoLink() { const { t } = useTranslation('common'); const { activeCollection } = useActiveCollection(); return ( {t('link.create')} ); }