fixed mobile tabs in settings
This commit is contained in:
1 parent
6ae1be6912
commit
0568e7250c
2 files changed
+77
-88
No files matched your search
+28
-38
@@ -1,16 +1,10 @@
|
||||
import Head from 'next/head';
|
||||
import Shell from '../../components/Shell';
|
||||
import SettingsShell from '../../components/Settings';
|
||||
import prisma from '../../lib/prisma';
|
||||
import {getSession, useSession} from 'next-auth/client';
|
||||
|
||||
export default function Billing(props) {
|
||||
const [ session, loading ] = useSession();
|
||||
|
||||
if (loading) {
|
||||
return <div className="loader"><span className="loader-inner"></span></div>;
|
||||
}
|
||||
import Head from "next/head";
|
||||
import Shell from "../../components/Shell";
|
||||
import SettingsShell from "../../components/Settings";
|
||||
import prisma from "../../lib/prisma";
|
||||
import { getSession } from "next-auth/client";
|
||||
|
||||
export default function Billing() {
|
||||
return (
|
||||
<Shell heading="Billing" subtitle="Manage your billing information and cancel your subscription.">
|
||||
<Head>
|
||||
@@ -18,10 +12,6 @@ export default function Billing(props) {
|
||||
</Head>
|
||||
<SettingsShell>
|
||||
<div className="py-6 lg:pb-8 lg:col-span-9">
|
||||
<div className="mb-6">
|
||||
<h2 className="text-lg leading-6 font-medium text-gray-900">Change your Subscription</h2>
|
||||
<p className="mt-1 text-sm text-gray-500">Cancel, update credit card or change plan</p>
|
||||
</div>
|
||||
<div className="my-6">
|
||||
<iframe
|
||||
src="https://calendso.com/subscription-embed"
|
||||
@@ -35,28 +25,28 @@ export default function Billing(props) {
|
||||
}
|
||||
|
||||
export async function getServerSideProps(context) {
|
||||
const session = await getSession(context);
|
||||
if (!session) {
|
||||
return { redirect: { permanent: false, destination: '/auth/login' } };
|
||||
}
|
||||
const session = await getSession(context);
|
||||
if (!session) {
|
||||
return { redirect: { permanent: false, destination: "/auth/login" } };
|
||||
}
|
||||
|
||||
const user = await prisma.user.findFirst({
|
||||
where: {
|
||||
email: session.user.email,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
name: true,
|
||||
email: true,
|
||||
bio: true,
|
||||
avatar: true,
|
||||
timeZone: true,
|
||||
weekStart: true,
|
||||
}
|
||||
});
|
||||
const user = await prisma.user.findFirst({
|
||||
where: {
|
||||
email: session.user.email,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
name: true,
|
||||
email: true,
|
||||
bio: true,
|
||||
avatar: true,
|
||||
timeZone: true,
|
||||
weekStart: true,
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
props: {user}, // will be passed to the page component as props
|
||||
}
|
||||
return {
|
||||
props: { user }, // will be passed to the page component as props
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user