Skip to content

Commit 6bfb563

Browse files
committed
disable auth stuff that cause huge amount of load time
1 parent c22d9e4 commit 6bfb563

File tree

5 files changed

+41
-32
lines changed

5 files changed

+41
-32
lines changed

frontend/src/pages/_app.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,29 @@ const App: NextPage<AppProps> = ({ Component, pageProps, router }) => (
4646

4747
<ToastContainer align="right" />
4848

49-
<AuthProvider>
50-
<Nav
51-
items={[
52-
{ name: "Home", path: "/", exact: true },
53-
{ name: "FAQ", path: "/faq" },
54-
{ name: "Forums", path: "https://forum.open.mp" },
55-
{ name: "Servers", path: "/servers" },
56-
{ name: "Partners", path: "/partners" },
57-
{ name: "Docs", path: "/docs" },
58-
{ name: "Blog", path: "/blog" },
59-
]}
60-
route={router.asPath}
61-
/>
49+
{/*
50+
Disable AuthProvider, we aint authing ANYONE here :peetah:
51+
<AuthProvider>
52+
*/}
53+
<Nav
54+
items={[
55+
{ name: "Home", path: "/", exact: true },
56+
{ name: "FAQ", path: "/faq" },
57+
{ name: "Forums", path: "https://forum.open.mp" },
58+
{ name: "Servers", path: "/servers" },
59+
{ name: "Partners", path: "/partners" },
60+
{ name: "Docs", path: "/docs" },
61+
{ name: "Blog", path: "/blog" },
62+
]}
63+
route={router.asPath}
64+
/>
6265

63-
<main>
64-
<Component {...pageProps} />
65-
</main>
66+
<main>
67+
<Component {...pageProps} />
68+
</main>
6669

67-
<Footer />
68-
</AuthProvider>
70+
<Footer />
71+
{/* </AuthProvider> */}
6972

7073
<style jsx global>{`
7174
html,

frontend/src/pages/auth/dev.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from "react";
22
import { API_ADDRESS } from "src/config";
33

44
const Page = () => {
5+
return null;
6+
57
return (
68
<div className="measure center pa4 ">
79
<form className="flex" action={`${API_ADDRESS}/users/dev`} method="get">

frontend/src/pages/dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const InfoItem = ({ title, idx }: { title: string; idx: string }) => {
3131

3232
const Page = () => (
3333
<>
34-
<section className="measure-wide center ph3">
34+
{/* <section className="measure-wide center ph3">
3535
<h1>Dashboard</h1>
3636
<ul className="measure center list pa0">
3737
<InfoItem title="Name" idx="name" />
@@ -58,7 +58,7 @@ const Page = () => (
5858
<a href="/logout" className="link">
5959
Logout
6060
</a>
61-
</section>
61+
</section> */}
6262
</>
6363
);
6464

frontend/src/pages/members/[id].tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ import { User, UserSchema } from "src/types/_generated_User";
88
type Props = SSP<User>;
99

1010
const Page: FC<Props> = (props) => {
11-
if (props.success === false) {
12-
return <ErrorBanner {...props.error} />;
13-
}
14-
return <MemberView user={props.data} />;
15-
};
11+
return null;
1612

17-
export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {
18-
const id = ctx.params?.["id"];
19-
return {
20-
props: await apiSSP<User>(`/users/${id}`, ctx, {
21-
schema: UserSchema,
22-
}),
23-
};
13+
// if (props.success === false) {
14+
// return <ErrorBanner {...props.error} />;
15+
// }
16+
// return <MemberView user={props.data} />;
2417
};
2518

19+
// export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {
20+
// const id = ctx.params?.["id"];
21+
// return {
22+
// props: await apiSSP<User>(`/users/${id}`, ctx, {
23+
// schema: UserSchema,
24+
// }),
25+
// };
26+
// };
27+
2628
export default Page;

frontend/src/pages/members/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ const BanModal = ({ users, user, setUsers }: any) => {
9090
};
9191

9292
export default function Members() {
93+
return null;
94+
9395
const [memberSearch, setMemberSearch] = useState("");
9496
const [sort, setSort] = useState("asc");
9597
const [pageExtremes, setPageExtremes] = useState({

0 commit comments

Comments
 (0)