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