basic settings added
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { createServerSupabaseClient } from "@supabase/auth-helpers-nextjs";
|
||||
import { createServerSupabaseClient } from "@supabase/auth-helpers-nextjs";
|
||||
import { GetServerSideProps, NextPage } from "next";
|
||||
import Head from "next/head";
|
||||
import DashboardBoby from "~/components/Dashboard";
|
||||
import DashboardLayout from "~/components/Layouts/DashboardLayout";
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
@@ -23,9 +25,14 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
};
|
||||
|
||||
const DashboardPage: NextPage = () => {
|
||||
return <DashboardLayout>
|
||||
a
|
||||
</DashboardLayout>;
|
||||
return (
|
||||
<DashboardLayout>
|
||||
<Head>
|
||||
<title>Dashboard / PageAssist</title>
|
||||
</Head>
|
||||
<DashboardBoby />
|
||||
</DashboardLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardPage;
|
||||
|
||||
38
src/pages/dashboard/settings.tsx
Normal file
38
src/pages/dashboard/settings.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import { createServerSupabaseClient } from "@supabase/auth-helpers-nextjs";
|
||||
import { GetServerSideProps, NextPage } from "next";
|
||||
import Head from "next/head";
|
||||
import DashboardLayout from "~/components/Layouts/DashboardLayout";
|
||||
import SettingsBody from "~/components/Settings";
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
const supabase = createServerSupabaseClient(ctx);
|
||||
const {
|
||||
data: { session },
|
||||
} = await supabase.auth.getSession();
|
||||
|
||||
if (!session) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/auth",
|
||||
permanent: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
props: {},
|
||||
};
|
||||
};
|
||||
|
||||
const DashboardSettingsPage: NextPage = () => {
|
||||
return (
|
||||
<DashboardLayout>
|
||||
<Head>
|
||||
<title>Settings / PageAssist</title>
|
||||
</Head>
|
||||
<SettingsBody />
|
||||
</DashboardLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default DashboardSettingsPage;
|
||||
Reference in New Issue
Block a user