@lolyjs/core 0.2.0-alpha.30 → 0.2.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1087,15 +1087,14 @@ export const getServerSideProps: ServerLoader = async (ctx) => {
1087
1087
  const data = await fetchData();
1088
1088
 
1089
1089
  // Redirect
1090
- return {
1091
- redirect: {
1092
- destination: "/new-path",
1093
- permanent: true,
1094
- },
1095
- };
1090
+ if (someCondition) {
1091
+ return ctx.Redirect("/new-path", true); // permanent redirect
1092
+ }
1096
1093
 
1097
1094
  // Not found
1098
- return { notFound: true };
1095
+ if (!data) {
1096
+ return ctx.NotFound();
1097
+ }
1099
1098
 
1100
1099
  // Return props
1101
1100
  return {