feat: add share url alias /s

This commit is contained in:
Elias Schneider
2023-07-22 16:09:10 +02:00
parent 7827b687fa
commit 231a2e95b9
9 changed files with 27 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
import { GetServerSidePropsContext } from "next";
// Redirect to the share page
export function getServerSideProps(context: GetServerSidePropsContext) {
const { shareId } = context.params!;
return {
props: {},
redirect: {
permanent: false,
destination: "/share/" + shareId,
},
};
}
export default function ShareAlias() {
return null;
}