mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
hide login page if no proxy needed
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { GetServerSideProps } from 'next';
|
||||
|
||||
import config from 'configs/app';
|
||||
import isNeedProxy from 'lib/api/isNeedProxy';
|
||||
const rollupFeature = config.features.rollup;
|
||||
|
||||
export type Props = {
|
||||
@@ -201,3 +202,14 @@ export const gasTracker: GetServerSideProps<Props> = async(context) => {
|
||||
|
||||
return base(context);
|
||||
};
|
||||
|
||||
export const login: GetServerSideProps<Props> = async(context) => {
|
||||
|
||||
if (!isNeedProxy()) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
return base(context);
|
||||
};
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ const Page: NextPage = () => {
|
||||
|
||||
export default Page;
|
||||
|
||||
export { base as getServerSideProps } from 'nextjs/getServerSideProps';
|
||||
export { login as getServerSideProps } from 'nextjs/getServerSideProps';
|
||||
|
||||
Reference in New Issue
Block a user