{"ast":null,"code":"import { Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport ErrorPage from \"next/error\";\nimport { useRouter } from \"next/router\";\nimport React from \"react\";\nimport { findExample, getExampleParams, getExamples } from \"../../lib/examples-api\";\nexport default (({\n  example\n}) => {\n  const router = useRouter();\n  if (!router.isFallback && !(example !== null && example !== void 0 && example.name)) return /*#__PURE__*/_jsx(ErrorPage, {\n    statusCode: 404\n  });\n  return /*#__PURE__*/_jsxs(_Fragment, {\n    children: [/*#__PURE__*/_jsxs(\"h1\", {\n      children: [\"Example \", example.name]\n    }), /*#__PURE__*/_jsx(\"div\", {\n      children: example.code\n    })]\n  });\n});\nexport async function getStaticProps({\n  params\n}) {\n  const example = findExample(params.example);\n  return {\n    props: {\n      example\n    }\n  };\n}\nexport async function getStaticPaths() {\n  const examples = getExamples();\n  return {\n    paths: examples.map(example => ({\n      params: getExampleParams(example)\n    })),\n    fallback: false\n  };\n}","map":null,"metadata":{},"sourceType":"module"}