mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
39 lines
993 B
TypeScript
39 lines
993 B
TypeScript
import dynamic from 'next/dynamic';
|
|
import React from 'react';
|
|
|
|
import type { NextPageWithLayout } from 'nextjs/types';
|
|
|
|
import type { Props } from 'nextjs/getServerSideProps/handlers';
|
|
import PageNextJs from 'nextjs/PageNextJs';
|
|
|
|
import config from 'configs/app';
|
|
import LayoutSearchResults from 'ui/shared/layout/LayoutSearchResults';
|
|
|
|
const SearchResults = dynamic(() => {
|
|
if (config.features.multichain.isEnabled) {
|
|
return import('ui/multichain/searchResults/SearchResults');
|
|
}
|
|
|
|
return import('ui/pages/SearchResults');
|
|
}, { ssr: false });
|
|
|
|
const Page: NextPageWithLayout<Props> = (props: Props) => {
|
|
return (
|
|
<PageNextJs pathname="/search-results" query={ props.query }>
|
|
<SearchResults/>
|
|
</PageNextJs>
|
|
);
|
|
};
|
|
|
|
Page.getLayout = function getLayout(page: React.ReactElement) {
|
|
return (
|
|
<LayoutSearchResults>
|
|
{ page }
|
|
</LayoutSearchResults>
|
|
);
|
|
};
|
|
|
|
export default Page;
|
|
|
|
export { base as getServerSideProps } from 'nextjs/getServerSideProps/main';
|