chore: fix memo links
This commit is contained in:
parent
9a88e00df0
commit
c8baeb86ec
3 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ const MemoActionMenu = (props: Props) => {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigateTo = useNavigateTo();
|
const navigateTo = useNavigateTo();
|
||||||
const memoStore = useMemoStore();
|
const memoStore = useMemoStore();
|
||||||
const isInMemoDetailPage = location.pathname.startsWith(`/m/${memo.name}`);
|
const isInMemoDetailPage = location.pathname.startsWith(`/m/${memo.uid}`);
|
||||||
|
|
||||||
const handleTogglePinMemoBtnClick = async () => {
|
const handleTogglePinMemoBtnClick = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const ReferencedMemo = ({ resourceId, params: paramsStr }: Props) => {
|
||||||
const displayContent = paramsText || (memo.content.length > 12 ? `${memo.content.slice(0, 12)}...` : memo.content);
|
const displayContent = paramsText || (memo.content.length > 12 ? `${memo.content.slice(0, 12)}...` : memo.content);
|
||||||
|
|
||||||
const handleGotoMemoDetailPage = () => {
|
const handleGotoMemoDetailPage = () => {
|
||||||
navigateTo(`/m/${memo.name}`);
|
navigateTo(`/m/${memo.uid}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
|
||||||
).length;
|
).length;
|
||||||
const relativeTimeFormat = Date.now() - memo.displayTime!.getTime() > 1000 * 60 * 60 * 24 ? "datetime" : "auto";
|
const relativeTimeFormat = Date.now() - memo.displayTime!.getTime() > 1000 * 60 * 60 * 24 ? "datetime" : "auto";
|
||||||
const readonly = memo.creator !== user?.name;
|
const readonly = memo.creator !== user?.name;
|
||||||
const isInMemoDetailPage = location.pathname.startsWith(`/m/${memo.name}`);
|
const isInMemoDetailPage = location.pathname.startsWith(`/m/${memo.uid}`);
|
||||||
|
|
||||||
// Initial related data: creator.
|
// Initial related data: creator.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue