mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
page titles and nav
This commit is contained in:
@ -24,7 +24,7 @@ const navigation = [
|
|||||||
{ name: "Settings", href: "/settings", current: true },
|
{ name: "Settings", href: "/settings", current: true },
|
||||||
];
|
];
|
||||||
const userNavigation = [
|
const userNavigation = [
|
||||||
{ name: "Your Profile", href: "/settings" },
|
{ name: "Your Profile", href: "/settings/profile" },
|
||||||
{
|
{
|
||||||
name: "Sign out",
|
name: "Sign out",
|
||||||
href: "",
|
href: "",
|
||||||
@ -42,7 +42,7 @@ function classNames(...classes: any) {
|
|||||||
export default function Layout({ children }: any) {
|
export default function Layout({ children }: any) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
navigation.forEach((element) => {
|
navigation.forEach((element) => {
|
||||||
element.current = router.route.startsWith(element.href);
|
element.current = router.route.startsWith("/" + element.href.split("/")[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import {
|
|||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
name: "Debbie Lewis",
|
name: "Debbie Lewis",
|
||||||
@ -56,13 +57,15 @@ export default function Setttings() {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
console.log(router.route);
|
console.log(router.route);
|
||||||
|
|
||||||
subNavigation.forEach((element) => {
|
subNavigation.forEach((element) => {
|
||||||
element.current = element.href == router.route;
|
element.current = element.href == router.route;
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<Head>
|
||||||
|
<title>Settings | Documenso</title>
|
||||||
|
</Head>
|
||||||
<header className="py-10">
|
<header className="py-10">
|
||||||
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
||||||
<h1 className="text-3xl font-bold leading-tight tracking-tight text-brown">
|
<h1 className="text-3xl font-bold leading-tight tracking-tight text-brown">
|
||||||
|
|||||||
@ -1,10 +1,20 @@
|
|||||||
|
import Head from "next/head";
|
||||||
import type { ReactElement } from "react";
|
import type { ReactElement } from "react";
|
||||||
import Layout from "../components/layout";
|
import Layout from "../components/layout";
|
||||||
import Settings from "../components/settings";
|
import Settings from "../components/settings";
|
||||||
import type { NextPageWithLayout } from "./_app";
|
import type { NextPageWithLayout } from "./_app";
|
||||||
|
|
||||||
const DashboardPage: NextPageWithLayout = () => {
|
const DashboardPage: NextPageWithLayout = () => {
|
||||||
return <>This is the dashboard page.</>;
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Dashboard | Documenso</title>
|
||||||
|
</Head>
|
||||||
|
<div>
|
||||||
|
<p>This is the dashboard page.</p>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
DashboardPage.getLayout = function getLayout(page: ReactElement) {
|
DashboardPage.getLayout = function getLayout(page: ReactElement) {
|
||||||
|
|||||||
@ -4,11 +4,19 @@ import Layout from "../components/layout";
|
|||||||
import Settings from "../components/settings";
|
import Settings from "../components/settings";
|
||||||
import type { NextPageWithLayout } from "./_app";
|
import type { NextPageWithLayout } from "./_app";
|
||||||
import { SessionProvider } from "next-auth/react";
|
import { SessionProvider } from "next-auth/react";
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
const DocumentsPage: NextPageWithLayout = () => {
|
const DocumentsPage: NextPageWithLayout = () => {
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
|
||||||
return <>This is the documents page</>;
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Documents | Documenso</title>
|
||||||
|
</Head>
|
||||||
|
This is the documents page
|
||||||
|
</>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
DocumentsPage.getLayout = function getLayout(page: ReactElement) {
|
DocumentsPage.getLayout = function getLayout(page: ReactElement) {
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
|
import Head from "next/head";
|
||||||
import Login from "../components/login";
|
import Login from "../components/login";
|
||||||
|
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>Login | Documenso</title>
|
||||||
|
</Head>
|
||||||
<Login></Login>
|
<Login></Login>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user