forked from admin/zeropost-tool
feat: post variants, transforms, image generation, AI ideas, channel edit page with image style settings
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { notFound, redirect } from 'next/navigation';
|
||||
import { requireUser } from '@/lib/session';
|
||||
import { engine } from '@/lib/engine';
|
||||
import Header from '@/components/Header';
|
||||
import ChannelEdit from '@/components/ChannelEdit';
|
||||
|
||||
export default async function ChannelEditPage({ params }) {
|
||||
const user = await requireUser();
|
||||
if (!user) redirect('/login');
|
||||
const { id } = await params;
|
||||
let channel;
|
||||
try { channel = await engine.getChannel(user.id, id); } catch { notFound(); }
|
||||
if (!channel) notFound();
|
||||
return (
|
||||
<>
|
||||
<Header user={user} />
|
||||
<ChannelEdit channel={channel} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user