Skip to content

Commit

Permalink
feat: create a new papers page (#971)
Browse files Browse the repository at this point in the history
* feat: create a new `papers` page

* fix: remove old papers route

* feat: add /papers as the resolution to the Technical Papers header nav

* chore: upload pdf files

---------

Co-authored-by: Charles Garrett <charleslavong@gmail.com>
  • Loading branch information
shelegdmitriy and charleslavon authored Feb 14, 2024
1 parent 10ba1ea commit 3109a00
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 2 deletions.
Binary file added public/files/doomslug.pdf
Binary file not shown.
Binary file added public/files/nightshade.pdf
Binary file not shown.
Binary file added public/files/white-paper-near-protocol.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/navigation/navigation-categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const navigationCategories = [
},
{
title: 'Technical Papers',
url: 'https://docs.near.org/concepts/advanced/papers',
url: '/papers',
},
],
},
Expand Down
3 changes: 3 additions & 0 deletions src/data/bos-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type NetworkComponents = {
dataAvailabilityPage: string;
termsPage: string;
privacyPage: string;
papersPage: string;
};
relayerDemo: string;
notificationButton: string;
Expand Down Expand Up @@ -100,6 +101,7 @@ export const componentsByNetworkId = ((): Record<NetworkId, NetworkComponents |
dataAvailabilityPage: `${testnetTLA}/widget/NearOrg.DataAvailabilityPage`,
termsPage: `${testnetTLA}/widget/NearOrg.TermsPage`,
privacyPage: `${testnetTLA}/widget/NearOrg.PrivacyPage`,
papersPage: `${testnetTLA}/widget/NearOrg.PapersPage`,
},
relayerDemo: 'one.testnet/widget/RelayerMessageDemo',
notificationButton: `${testnetTLA}/widget/NotificationButton`,
Expand Down Expand Up @@ -157,6 +159,7 @@ export const componentsByNetworkId = ((): Record<NetworkId, NetworkComponents |
dataAvailabilityPage: 'near/widget/NearOrg.DataAvailabilityPage',
termsPage: 'near/widget/NearOrg.TermsPage',
privacyPage: 'near/widget/NearOrg.PrivacyPage',
papersPage: 'near/widget/NearOrg.PapersPage',
},
relayerDemo: 'relayer-demo.near/widget/RelayerMessageDemo',
notificationButton: 'near/widget/NotificationButton',
Expand Down
1 change: 0 additions & 1 deletion src/pages/[...arbitrary].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const extendableRoutes: Record<string, string> = {
about: 'https://pages.near.org/about',
blog: 'https://pages.near.org/blog',
papers: 'https://pages.near.org/papers',
};

// routes which are extendable but may have some paths
Expand Down
28 changes: 28 additions & 0 deletions src/pages/papers/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { ComponentWrapperPage } from '@/components/near-org/ComponentWrapperPage';
import { useBosComponents } from '@/hooks/useBosComponents';
import { useDefaultLayout } from '@/hooks/useLayout';
import type { NextPageWithLayout } from '@/utils/types';

const PapersPage: NextPageWithLayout = () => {
const components = useBosComponents();
return (
<ComponentWrapperPage
src={components.nearOrg.papersPage}
meta={{
title: 'NEAR | Papers',
description: 'Join us as we dive deep into our technology.',
}}
componentProps={{
docs: {
doomslug: '/files/doomslug.pdf',
nightshade: '/files/nightshade.pdf',
whitePaperNearProtocol: '/files/white-paper-near-protocol.pdf',
},
}}
/>
);
};

PapersPage.getLayout = useDefaultLayout;

export default PapersPage;

0 comments on commit 3109a00

Please sign in to comment.