mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
refactor: use tabs instead of spaces
This commit is contained in:
@@ -7,60 +7,60 @@ 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`,
|
||||
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',
|
||||
minWidth: 0,
|
||||
width: '100%',
|
||||
textAlign: 'center',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
});
|
||||
|
||||
export function NoCollection() {
|
||||
const { t } = useTranslation('home');
|
||||
return (
|
||||
<NoCollectionStyle>
|
||||
<Text>{t('select-collection')}</Text>
|
||||
<Link href={route('collection.create-form').url}>
|
||||
{t('or-create-one')}
|
||||
</Link>
|
||||
</NoCollectionStyle>
|
||||
);
|
||||
const { t } = useTranslation('home');
|
||||
return (
|
||||
<NoCollectionStyle>
|
||||
<Text>{t('select-collection')}</Text>
|
||||
<Link href={route('collection.create-form').url}>
|
||||
{t('or-create-one')}
|
||||
</Link>
|
||||
</NoCollectionStyle>
|
||||
);
|
||||
}
|
||||
|
||||
export function NoLink() {
|
||||
const { t } = useTranslation('common');
|
||||
const { activeCollection } = useActiveCollection();
|
||||
return (
|
||||
<NoCollectionStyle>
|
||||
<Text
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: t(
|
||||
'home:no-link',
|
||||
{ name: activeCollection?.name ?? '' } as any,
|
||||
{
|
||||
interpolation: { escapeValue: false },
|
||||
}
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Link
|
||||
href={appendCollectionId(
|
||||
route('link.create-form').url,
|
||||
activeCollection?.id
|
||||
)}
|
||||
>
|
||||
{t('link.create')}
|
||||
</Link>
|
||||
</NoCollectionStyle>
|
||||
);
|
||||
const { t } = useTranslation('common');
|
||||
const { activeCollection } = useActiveCollection();
|
||||
return (
|
||||
<NoCollectionStyle>
|
||||
<Text
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: t(
|
||||
'home:no-link',
|
||||
{ name: activeCollection?.name ?? '' } as any,
|
||||
{
|
||||
interpolation: { escapeValue: false },
|
||||
}
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Link
|
||||
href={appendCollectionId(
|
||||
route('link.create-form').url,
|
||||
activeCollection?.id
|
||||
)}
|
||||
>
|
||||
{t('link.create')}
|
||||
</Link>
|
||||
</NoCollectionStyle>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user