Skip to content

Commit

Permalink
disable hadits page
Browse files Browse the repository at this point in the history
  • Loading branch information
aacmal committed Jun 27, 2023
1 parent c12fed1 commit f947e18
Show file tree
Hide file tree
Showing 11 changed files with 271 additions and 223 deletions.
48 changes: 34 additions & 14 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,40 @@ const withPWA = require("@ducanh2912/next-pwa").default({
});

const config = {
// async redirects(){
// return [
// {
// source: '/surah',
// destination: '/',
// permanent: true
// },
// {
// source: '/juz',
// destination: '/',
// permanent: true
// }
// ]
// },
async redirects() {
return [
{
source: '/',
destination: '/quran/surah',
permanent: true
},
{
source: '/juz',
destination: '/quran/juz',
permanent: true
},
{
source: '/surah',
destination: '/quran/surah',
permanent: true
},
{
source: '/surah/:id',
destination: '/quran/surah/:id',
permanent: true
},
{
source: '/surah/:id/:ayah',
destination: '/quran/surah/:id/:ayah',
permanent: true
},
{
source: '/juz/:id',
destination: '/quran/juz/:id',
permanent: true
}
]
},
experimental: {
scrollRestoration: true,
},
Expand Down
20 changes: 0 additions & 20 deletions src/app/hadits/[hadithId]/handleClient.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/hadits/[hadithId]/layout.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions src/app/hadits/[hadithId]/page.tsx

This file was deleted.

65 changes: 0 additions & 65 deletions src/app/hadits/page.tsx

This file was deleted.

54 changes: 1 addition & 53 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,57 +24,5 @@ export const metadata: Metadata = {
};

export default function HomePage() {
return (
<Wrapper className="flex flex-col items-center gap-20 justify-center min-h-screen !pt-0 !max-w-none !w-screen bg-gradient-to-br from-emerald-400 to-emerald-600">
<h1 className="lg:text-5xl text-3xl bg-clip-text text-emerald-200 font-bold">
Assalamu&apos;alakum
</h1>
<div className="flex flex-wrap justify-center gap-5">
<Link
className="p-3 text-center w-fit bg-emerald-400/70 border-emerald-300 rounded-lg border-2 transition-all hover:border-emerald-100 hover:shadow-2xl hover:shadow-emerald-600"
href="/quran"
>
<Image
src="/images/read_quran.png"
alt="Baca Quran"
width={200}
height={200}
/>
<span className="font-semibold text-emerald-50 text-xl">
Baca Quran
</span>
</Link>
<Link
className="p-3 text-center w-fit bg-emerald-400/70 border-emerald-300 rounded-lg border-2 transition-all hover:border-emerald-100 hover:shadow-2xl hover:shadow-emerald-600"
href="/hadits"
>
<Image
src="/images/read_quran.png"
alt="Baca Quran"
width={200}
height={200}
/>
<span className="font-semibold text-emerald-50 text-xl">Hadits</span>
</Link>
<Link
className="p-3 text-center w-fit bg-emerald-400/70 border-emerald-300 rounded-lg border-2 transition-all hover:border-emerald-100 hover:shadow-2xl hover:shadow-emerald-600"
href="/"
>
<Image
src="/images/read_quran.png"
alt="Baca Quran"
width={200}
height={200}
/>
<span className="font-semibold text-emerald-50 text-xl">Doa</span>
</Link>
</div>
<Link
className="font-semibold text-emerald-50 text-lg underline"
href="/credits"
>
Credits
</Link>
</Wrapper>
);
return <></>;
}
20 changes: 20 additions & 0 deletions src/~page-offline/hadits/[hadithId]/handleClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 'use client';

// import useHadith from '@stores/hadithStore';
// import React, { useEffect } from 'react';

// type Props = {
// hadithId: string;
// };

// const HadithHandleClient = ({ hadithId }: Props) => {
// const setHadithActive = useHadith((state) => state.setHadithActive);

// useEffect(() => {
// setHadithActive(hadithId);
// // eslint-disable-next-line react-hooks/exhaustive-deps
// }, []);
// return <></>;
// };

// export default HadithHandleClient;
13 changes: 13 additions & 0 deletions src/~page-offline/hadits/[hadithId]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// import TopBar from '@components/TopBar/TopBar';
// import React from 'react';

// const HadithDetailLayout = ({ children }: { children: React.ReactNode }) => {
// return (
// <>
// <TopBar />
// {children}
// </>
// );
// };

// export default HadithDetailLayout;
58 changes: 58 additions & 0 deletions src/~page-offline/hadits/[hadithId]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// import HadithBanner from '@components/Banner/HadithBanner';
// import HadithVerse from '@components/Hadith/HadithVerse';
// import Wrapper from '@components/Wrapper';
// import { getHadithBooks, getHadithDetail } from '@utils/api/hadith';
// import React from 'react';
// import HadithHandleClient from './handleClient';
// import HadithReader from '@components/Hadith/HadithReader/HadithReader';

// type Props = {};

// const IS_PRODUCTION = process.env.NODE_ENV === 'production';

// export const generateStaticParams = async () => {
// const data = await getHadithBooks();
// return data.map((item) => ({
// hadithId: item.id,
// }));
// };

// export const generateMetadata = async ({ params }) => {
// const data = await getHadithDetail({ id: params.hadithId });
// return {
// title: `${data.name}`,
// description: `Baca hadits ${data.name} dengan jumlah ${data.available} hadits.`,
// robots: IS_PRODUCTION ? 'index, follow' : 'noindex, nofollow',
// openGraph: {
// title: `${data.name}`,
// description: `Baca hadits ${data.name} dengan jumlah ${data.available} hadits.`,
// },
// twitter: {
// title: `${data.name}`,
// description: `Baca hadits ${data.name} dengan jumlah ${data.available} hadits.`,
// },
// };
// };

// const HadithDetailPage = async ({
// params,
// }: {
// params: {
// hadithId: string;
// };
// }) => {
// const data = await getHadithDetail({ id: params.hadithId, range: '1-30' });
// return (
// <Wrapper className="px-5 my-14 2xl:px-0 pb-20">
// <HadithHandleClient hadithId={data.id} />
// <HadithBanner name={data.name} available={data.available} />
// <HadithReader
// id={data.id}
// available={data.available}
// hadiths={data.hadiths}
// />
// </Wrapper>
// );
// };

// export default HadithDetailPage;

1 comment on commit f947e18

@vercel
Copy link

@vercel vercel bot commented on f947e18 Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pustaka-islam – ./

pustaka-islam-axcamz.vercel.app
pustakaislam.vercel.app
pustaka-islam-git-master-axcamz.vercel.app

Please sign in to comment.