-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,64 @@ | ||
import dynamic from 'next/dynamic' | ||
import Image from 'next/image' | ||
import { getFileContent, getRoot } from '@/lib/authAndFetch' | ||
import { getBanner } from '@/lib/helpers' | ||
import SideMenu from '@/components/SideMenu' | ||
import { genMetadata } from '@/lib/helpers'; | ||
import { Metadata } from 'next'; | ||
import dynamic from "next/dynamic"; | ||
import Image from "next/image"; | ||
import { getFileContent, getRoot } from "@/lib/authAndFetch"; | ||
import { getBanner } from "@/lib/helpers"; | ||
import SideMenu from "@/components/SideMenu"; | ||
import { genMetadata } from "@/lib/helpers"; | ||
import { Metadata } from "next"; | ||
|
||
const imgUrl = getBanner(`using-zcash`) | ||
const imgUrl = getBanner(`using-zcash`); | ||
|
||
export const metadata: Metadata = genMetadata({ | ||
title: "Shielded pools", | ||
url: "https://zechub.wiki/using-zcash/shielded-pools", | ||
image: imgUrl, | ||
}) | ||
title: "Shielded pools", | ||
url: "https://zechub.wiki/using-zcash/shielded-pools", | ||
image: imgUrl, | ||
}); | ||
|
||
const MdxComponent = dynamic( | ||
() => import('@/components/MdxComponent'), | ||
{ | ||
loading: () => <span className='text-center text-3xl'>Loading...</span>, | ||
} | ||
) | ||
const MdxComponent = dynamic(() => import("@/components/MdxComponent"), { | ||
loading: () => <span className="text-center text-3xl">Loading...</span>, | ||
}); | ||
|
||
export default async function Page({ params }: { params: { slug: string } }) { | ||
const { slug } = params; | ||
const url = `/site/Using_Zcash/Shielded_Pools.md`; | ||
|
||
const { slug } = params | ||
const url = `/site/Using_Zcash/Shielded_Pools.md` | ||
const markdown = await getFileContent(url); | ||
|
||
const markdown = await getFileContent(url) | ||
const content = markdown ? markdown : "No Data or Wrong file"; | ||
const urlRoot = `/site/using-zcash`; | ||
const roots = await getRoot(urlRoot); | ||
|
||
const content = markdown ? markdown : 'No Data or Wrong file' | ||
const urlRoot = `/site/using-zcash` | ||
const roots = await getRoot(urlRoot) | ||
|
||
return ( | ||
<main> | ||
<div className="flex justify-center w-full mb-5 bg-transparent rounded pb-4"> | ||
<Image | ||
className="w-full mb-5 object-cover " | ||
alt="wiki-banner" | ||
width={800} | ||
height={50} | ||
src={imgUrl != undefined ? imgUrl : "/wiki-banner.avif"} | ||
/> | ||
</div> | ||
|
||
<div | ||
id="content" | ||
className={`flex shielded-pools flex-col space-y-5 ${ | ||
roots && roots.length > 0 ? "md:flex-row md:space-x-5" : "md:flex-col" | ||
} h-auto w-full md:p-5`} | ||
> | ||
{roots && roots.length > 0 && ( | ||
<div className="w-auto md:w-2/5 relative"> | ||
<SideMenu folder={urlRoot} roots={roots} /> | ||
</div> | ||
)} | ||
|
||
return ( | ||
|
||
<main> | ||
<div className='flex justify-center w-full mb-5 bg-transparent rounded pb-4'> | ||
<Image | ||
className="w-full mb-5 object-cover " | ||
alt="wiki-banner" | ||
width={800} | ||
height={50} | ||
src={imgUrl != undefined ? imgUrl : '/wiki-banner.avif'} | ||
/> | ||
</div> | ||
|
||
<div id="content" className={`flex shielded-pools flex-col space-y-5 ${roots && roots.length > 0 ? 'md:flex-row md:space-x-5' : 'md:flex-col'} h-auto w-full md:p-5`}> | ||
{(roots && roots.length > 0) && ( | ||
<div className='w-auto md:w-2/5 relative'> | ||
<SideMenu folder={urlRoot} roots={roots} /> | ||
</div> | ||
|
||
)} | ||
|
||
<section className='h-auto w-full border-t-2 md:border-l-2 px-3'> | ||
<div> | ||
<MdxComponent source={content} slug={slug[1]} /> | ||
</div> | ||
</section> | ||
</div> | ||
</main> | ||
) | ||
<section className="h-auto w-full border-t-2 md:border-l-2 px-3"> | ||
<div> | ||
<MdxComponent source={content} slug={"shielded-pools"} /> | ||
</div> | ||
</section> | ||
</div> | ||
</main> | ||
); | ||
} |