2026-09-19 21:50:06 +03:00
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
2026-09-20 01:39:04 +03:00
|
|
|
import { InviteJoin } from '@/components/friends/InviteJoin';
|
2026-09-19 21:50:06 +03:00
|
|
|
import { Button, Card } from '@/components/ui/primitives';
|
2026-09-20 01:39:04 +03:00
|
|
|
import { useUiStore } from '@/stores/ui';
|
2026-09-19 21:50:06 +03:00
|
|
|
|
|
|
|
|
/**
|
2026-09-20 01:39:04 +03:00
|
|
|
* Экран пустого списка серверов. Главного сервера больше нет: новый
|
|
|
|
|
* пользователь видит пустую рейку, может создать свой сервер или
|
|
|
|
|
* присоединиться по приглашению. Иконки серверов появятся в рейке сразу
|
|
|
|
|
* после вступления.
|
2026-09-19 21:50:06 +03:00
|
|
|
*/
|
|
|
|
|
export default function NoGuildView() {
|
|
|
|
|
const { t } = useTranslation();
|
2026-09-20 01:39:04 +03:00
|
|
|
const openGuildCreate = useUiStore((state) => state.openGuildCreate);
|
2026-09-19 21:50:06 +03:00
|
|
|
|
|
|
|
|
return (
|
2026-09-20 01:39:04 +03:00
|
|
|
<section id="app-content" className="absolute inset-0 overflow-y-auto p-6">
|
|
|
|
|
<div className="flex min-h-full items-center justify-center">
|
|
|
|
|
<Card className="w-full max-w-lg">
|
|
|
|
|
<h2 className="text-lg font-semibold">{t('guilds.empty.title')}</h2>
|
|
|
|
|
<p className="mt-2 text-sm text-fg-muted">{t('guilds.empty.body')}</p>
|
|
|
|
|
|
|
|
|
|
<Button className="mt-4" onClick={openGuildCreate}>
|
|
|
|
|
{t('guilds.add')}
|
2026-09-19 21:50:06 +03:00
|
|
|
</Button>
|
|
|
|
|
|
2026-09-20 01:39:04 +03:00
|
|
|
<InviteJoin className="mt-6 border-t border-border/60 pt-4" />
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
2026-09-19 21:50:06 +03:00
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
}
|