Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion frontend/main/src/pages/course/[coursePath]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
getSite,
getStripeProduct,
postBySlugService,
postsService,
} from '@/services/serversideApi';

import { Post as PostModel, PostType } from '@/models/post.model';
Expand Down Expand Up @@ -437,7 +438,17 @@ export default function Post({
);
}

export async function getServerSideProps({
export async function getStaticPaths(): Promise<{
paths: { params: { type: PostType; slug: string } }[];
fallback: boolean;
}> {
return {
paths: [],
fallback: true,
};
}

export async function getStaticProps({
params,
}: {
params: { coursePath: string };
Expand All @@ -449,6 +460,7 @@ export async function getServerSideProps({
source: Source | null;
product: StripeProduct | null;
};
revalidate: number;
}
| { redirect: { destination: string; permanent: boolean } }
| { notFound: boolean }
Expand Down Expand Up @@ -531,5 +543,6 @@ export async function getServerSideProps({
source,
product,
},
revalidate: 3600,
};
}