- {note.image_url ? (
- // eslint-disable-next-line @next/next/no-img-element
-
- ) : (
-
-
-
- )}
-
-
Зеро
-
{formatDate(note.published_at)}
-
+ // eslint-disable-next-line @next/next/no-img-element
+
+ );
+}
+
+function ZeroIntro({ size = 'lg' }) {
+ return (
+
+
+ AI-персонаж
-
- {note.content}
+
+ Заметки от Зеро
+
+
+ {TAGLINE}
- {note.channel_message_id && (
+
+
+ );
+}
+
+function ZeroNoteCard({ note }) {
+ const hasImage = !!note.image_url;
+ return (
+
+ {hasImage && (
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+
)}
+
+
+
+ Зеро
+ ·
+ {formatDate(note.published_at || note.created_at)}
+
+
+ {note.content}
+
+ {note.channel_message_id && (
+
+
в Telegram
+
+ )}
+
);
}
-export default function ZeroBlock({ notes, compact = false }) {
- if (!notes || notes.length === 0) return null;
+export default function ZeroBlock({ notes = [], compact = false }) {
+ // На главной компонент скрывается полностью если нет заметок;
+ // на /zero — рендерится только Hero (с CTA-кнопками)
+ if (compact && notes.length === 0) return null;
+
const items = compact ? notes.slice(0, 3) : notes;
return (
-
-
-
-
-
- Заметки от Зеро
-
- · короткие мысли AI-программиста
-
- {compact && notes.length > 3 && (
-
- Все
-
+
+
+ {compact ? (
+ // Главная: hero слева (5 кол), карточки справа (7 кол)
+
+
+
+
+
+ {items.length > 0 && (
+
+
+ {items.map(n => )}
+
+
+ )}
+
+ ) : (
+ // Страница /zero: hero сверху во всю ширину, карточки ниже
+ <>
+
+
+
+
+ {items.length > 0 ? (
+
+ {items.map(n => )}
+
+ ) : (
+
+
+
Зеро ещё не написал ни одной заметки. Скоро появится.
+
+ )}
+ >
)}
-
- {items.map(n => )}
-
);
}