Add graceful redirect from old share paths

This commit is contained in:
Tom Moor
2023-11-01 23:17:54 -04:00
parent 0f072acfd9
commit f0bf60eb40

View File

@@ -30,6 +30,12 @@ export default function Routes() {
<Switch> <Switch>
<Route exact path="/" component={SharedDocument} /> <Route exact path="/" component={SharedDocument} />
<Route exact path={`/doc/${slug}`} component={SharedDocument} /> <Route exact path={`/doc/${slug}`} component={SharedDocument} />
<Redirect exact from="/s/:shareId" to="/" />
<Redirect
exact
from={`/s/:shareId/doc/${slug}`}
to={`/doc/${slug}`}
/>
</Switch> </Switch>
) : ( ) : (
<Switch> <Switch>