feat(market): channel, posts, composer, home feed and following
The creator's channel and post pages, the post composer, the investor's home feed and the following tab, in bull and bear.
- Channel and post page start from the server's read and re-read in the browser for the creator or a subscriber; locked posts show a gate only once the viewer and their standing are known, frozen for another creator.
- Composer: text and up to four images uploaded as picked, free or premium, a device draft that keeps stored file URLs, 15-minute edit of a published post; on desktop a dialog over the page through bear's @modal intercept.
- Owner actions: preview as a visitor or subscriber, edit, delete (dialogs locked while sending), close a prediction with the outcome the API recorded.
- Follow and unfollow run in tap order; the home feed dates posts from its last read; paged lists read past pages with nothing to show.
- Cache stays true after mutations: a delete re-reads the channel's offset pages, a new post resets them, and a post page delete navigates without a stale refresh.
- Navigation: bottom nav, mobile top bar, desktop header and publish menu; the preview chrome only for the creator's own post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
import { FlexBox } from '@lumina/island/atoms/flex-box';
|
|
|
|
|
import { BottomNav } from '@lumina/market/app/navigation';
|
|
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
|
|
2026-10-07 19:02:58 +00:00
|
|
|
// Every request renders fresh: nothing in this group is prerendered or cached on the server.
|
|
|
|
|
// Only the landing is (0026), so this lives in each route group's layout, not the root's.
|
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
|
|
feat(market): channel, posts, composer, home feed and following
The creator's channel and post pages, the post composer, the investor's home feed and the following tab, in bull and bear.
- Channel and post page start from the server's read and re-read in the browser for the creator or a subscriber; locked posts show a gate only once the viewer and their standing are known, frozen for another creator.
- Composer: text and up to four images uploaded as picked, free or premium, a device draft that keeps stored file URLs, 15-minute edit of a published post; on desktop a dialog over the page through bear's @modal intercept.
- Owner actions: preview as a visitor or subscriber, edit, delete (dialogs locked while sending), close a prediction with the outcome the API recorded.
- Follow and unfollow run in tap order; the home feed dates posts from its last read; paged lists read past pages with nothing to show.
- Cache stays true after mutations: a delete re-reads the channel's offset pages, a new post resets them, and a post page delete navigates without a stale refresh.
- Navigation: bottom nav, mobile top bar, desktop header and publish menu; the preview chrome only for the creator's own post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
/** The main pages on mobile: each page brings its top bar; the bottom nav is shared. */
|
|
|
|
|
export default function MainLayout({ children }: { children: ReactNode }) {
|
|
|
|
|
return (
|
|
|
|
|
<FlexBox direction="flex-col" className="min-h-dvh bg-bg-page">
|
|
|
|
|
{children}
|
|
|
|
|
<BottomNav />
|
|
|
|
|
</FlexBox>
|
|
|
|
|
);
|
|
|
|
|
}
|