add getStaticProps to use static optimization
This commit is contained in:
+3
-1
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import styled from "styled-components";
|
||||
|
||||
@@ -25,4 +25,6 @@ const NotFoundPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default NotFoundPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { formatRelative } from "date-fns";
|
||||
import { toast } from "react-toastify";
|
||||
import styled from "styled-components";
|
||||
@@ -75,4 +75,6 @@ const AdminEventPage: NextPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminEventPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { formatRelative } from "date-fns";
|
||||
import { toast } from "react-toastify";
|
||||
import styled from "styled-components";
|
||||
@@ -75,4 +75,6 @@ const AdminFeedPage: NextPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminFeedPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import AdminPageWrapper from "@views/common/AdminPageWrapper";
|
||||
|
||||
@@ -16,4 +16,6 @@ const AdminFrontPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminFrontPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { formatRelative } from "date-fns";
|
||||
import { toast } from "react-toastify";
|
||||
import styled from "styled-components";
|
||||
@@ -79,4 +79,6 @@ const AdminJobAdPage: NextPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminJobAdPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { useRouter } from "next/router";
|
||||
import styled from "styled-components";
|
||||
import { generateToken, setTokenCookie, isAuthenticated } from "@utils/auth";
|
||||
@@ -80,4 +80,6 @@ const AdminLoginPage: NextPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminLoginPage;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { useRouter } from "next/router";
|
||||
import { deleteTokenCookie } from "@utils/auth";
|
||||
|
||||
@@ -12,4 +12,6 @@ const AdminLogoutPage: NextPage = () => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminLogoutPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import { formatRelative } from "date-fns";
|
||||
import { toast } from "react-toastify";
|
||||
import styled from "styled-components";
|
||||
@@ -84,4 +84,6 @@ const AdminSignupPage: NextPage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default AdminSignupPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import FreshmenPageView from "@views/FreshmenPage/FreshmenPageView";
|
||||
import PageWrapper from "@views/common/PageWrapper";
|
||||
@@ -15,4 +15,6 @@ const FreshmenPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default FreshmenPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import GuildPageView from "@views/GuildPage/GuildPageView";
|
||||
import PageWrapper from "@views/common/PageWrapper";
|
||||
@@ -15,4 +15,6 @@ const GuildPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default GuildPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import HonoraryPageView from "@views/HonoraryPage/HonoraryPageView";
|
||||
import PageWrapper from "@views/common/PageWrapper";
|
||||
@@ -15,4 +15,6 @@ const HonoraryPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default HonoraryPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import StudiesPageView from "@views/StudiesPage/StudiesPageView";
|
||||
import PageWrapper from "@views/common/PageWrapper";
|
||||
@@ -15,4 +15,6 @@ const StudiesPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default StudiesPage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { NextPage } from "next";
|
||||
import { NextPage, GetStaticProps } from "next";
|
||||
import Head from "next/head";
|
||||
import ContactsPageView from "@views/ContactsPage/ContactsPageView";
|
||||
import PageWrapper from "@views/common/PageWrapper";
|
||||
@@ -15,4 +15,6 @@ const ContactsPage: NextPage = () => (
|
||||
</>
|
||||
);
|
||||
|
||||
export const getStaticProps: GetStaticProps = async () => ({ props: {} });
|
||||
|
||||
export default ContactsPage;
|
||||
|
||||
Reference in New Issue
Block a user