Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

481 B
Raw Blame
import { Navigate, useLocation, useParams } from "react-router-dom";
import { ROUTES, withCollectionCreator } from "./routes";

/** Keep existing author links usable while Home owns creator scope. */
export const LegacyProfileRedirect = () => {
  const { username } = useParams<{ username: string }>();
  const location = useLocation();
  return <Navigate to={{ pathname: ROUTES.HOME, search: withCollectionCreator(location.search, username), hash: location.hash }} replace />;
};