Skip to content

Commit

Permalink
pushed
Browse files Browse the repository at this point in the history
  • Loading branch information
teslasdev committed Nov 26, 2024
1 parent d4050f7 commit 69815d9
Showing 1 changed file with 51 additions and 53 deletions.
104 changes: 51 additions & 53 deletions src/app/using-zcash/shielded-pools/page.tsx
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>
);
}

0 comments on commit 69815d9

Please sign in to comment.