feat: initiated public profile

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
This commit is contained in:
Adithya Krishna
2024-05-01 16:16:55 +05:30
parent 15dee5ef35
commit 69c175d38e
9 changed files with 263 additions and 6 deletions

View File

@@ -0,0 +1,9 @@
import React from 'react';
export type PublicProfileSettingsLayout = {
children: React.ReactNode;
};
export default function PublicProfileSettingsLayout({ children }: PublicProfileSettingsLayout) {
return <div className="col-span-12 md:col-span-9">{children}</div>;
}

View File

@@ -0,0 +1,40 @@
import type { Metadata } from 'next';
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
import { Switch } from '@documenso/ui/primitives/switch';
import { SettingsHeader } from '~/components/(dashboard)/settings/layout/header';
import { LinkTemplatesForm } from '~/components/forms/link-templates';
import { PublicProfileForm } from '~/components/forms/public-profile';
export const metadata: Metadata = {
title: 'Public profile',
};
export default async function PublicProfileSettingsPage() {
const { user } = await getRequiredServerComponentSession();
return (
<div>
<SettingsHeader
title="Public profile"
subtitle="You can choose to enable/disable your profile for public view"
className="justify"
>
<div className="flex flex-row">
<label className="mr-2 text-white" htmlFor="hide">
Hide
</label>
<Switch />
<label className="ml-2 text-white" htmlFor="show">
Show
</label>
</div>
</SettingsHeader>
<PublicProfileForm className="mb-8 max-w-xl" user={user} />
<LinkTemplatesForm />
</div>
);
}