* Create 2013 package
* Create 2016 package
* Add ews
* Update package.json
* Translate 2013 app to new structure
* Translate 2013 app to new structure
* Translate 2016 app to new structure
* Add appId
* Move setup to a seperate page
* RHF dependency version mismatch
* Move exchange 2016 setup to new page
* Add translations
* Relying on AppSetupMap not defined static pages
* Console build fixes
* Resolved node version to 16
* Prisma errors can't be handled on client
* Fixes node version mismatches
* Improvements
* Endpoint fixes
* Revert "Endpoint fixes"
This reverts commit c0320e3f3d
.
* Fixes
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
21 lines
575 B
TypeScript
21 lines
575 B
TypeScript
import { GetStaticPropsContext } from "next";
|
|
|
|
export const AppSetupPageMap = {
|
|
zapier: import("../../zapier/pages/setup/_getStaticProps"),
|
|
};
|
|
|
|
export const getStaticProps = async (ctx: GetStaticPropsContext) => {
|
|
const { slug } = ctx.params || {};
|
|
if (typeof slug !== "string") return { notFound: true } as const;
|
|
|
|
if (!(slug in AppSetupPageMap)) return { props: {} };
|
|
|
|
const page = await AppSetupPageMap[slug as keyof typeof AppSetupPageMap];
|
|
|
|
if (!page.getStaticProps) return { props: {} };
|
|
|
|
const props = await page.getStaticProps(ctx);
|
|
|
|
return props;
|
|
};
|