Commit 10560733 authored by tom's avatar tom

refactor account pages

parent f8e951c9
import type { GetStaticPaths } from 'next';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import ApiKeys from 'ui/pages/ApiKeys';
......@@ -27,14 +26,5 @@ const ApiKeysPage: NextPage<Props> = ({ pageParams }: Props) => {
export default ApiKeysPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import CustomAbi from 'ui/pages/CustomAbi';
......@@ -27,14 +26,5 @@ const CustomAbiPage: NextPage<Props> = ({ pageParams }: Props) => {
export default CustomAbiPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import PublicTags from 'ui/pages/PublicTags';
......@@ -27,14 +26,5 @@ const PublicTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
export default PublicTagsPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import PrivateTags from 'ui/pages/PrivateTags';
......@@ -27,14 +26,5 @@ const AddressTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
export default AddressTagsPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import PrivateTags from 'ui/pages/PrivateTags';
......@@ -27,14 +26,5 @@ const TransactionTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
export default TransactionTagsPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths, GetStaticProps, GetStaticPropsResult } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import WatchList from 'ui/pages/Watchlist';
......@@ -29,14 +28,5 @@ const WatchListPage: NextPage<Props> = ({ pageParams }: Props) => {
export default WatchListPage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps: GetStaticProps = async(context): Promise<GetStaticPropsResult<Props>> => {
return {
props: {
pageParams: context.params as PageParams,
},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
import type { NextPage, GetStaticPaths } from 'next';
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getAvailablePaths from 'lib/networks/getAvailablePaths';
import MyProfile from 'ui/pages/MyProfile';
const MyProfilePage: NextPage = () => {
......@@ -16,12 +15,5 @@ const MyProfilePage: NextPage = () => {
export default MyProfilePage;
export const getStaticPaths: GetStaticPaths = async() => {
return { paths: getAvailablePaths(), fallback: false };
};
export const getStaticProps = async() => {
return {
props: {},
};
};
export { getStaticPaths } from 'lib/next/account/getStaticPaths';
export { getStaticProps } from 'lib/next/getStaticProps';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment