Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
c8baeb86
Commit
c8baeb86
authored
Mar 30, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix memo links
parent
9a88e00d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
MemoActionMenu.tsx
web/src/components/MemoActionMenu.tsx
+1
-1
ReferencedMemo.tsx
...mponents/MemoContent/ReferencedContent/ReferencedMemo.tsx
+1
-1
MemoView.tsx
web/src/components/MemoView.tsx
+1
-1
No files found.
web/src/components/MemoActionMenu.tsx
View file @
c8baeb86
...
...
@@ -24,7 +24,7 @@ const MemoActionMenu = (props: Props) => {
const
location
=
useLocation
();
const
navigateTo
=
useNavigateTo
();
const
memoStore
=
useMemoStore
();
const
isInMemoDetailPage
=
location
.
pathname
.
startsWith
(
`/m/
${
memo
.
name
}
`
);
const
isInMemoDetailPage
=
location
.
pathname
.
startsWith
(
`/m/
${
memo
.
uid
}
`
);
const
handleTogglePinMemoBtnClick
=
async
()
=>
{
try
{
...
...
web/src/components/MemoContent/ReferencedContent/ReferencedMemo.tsx
View file @
c8baeb86
...
...
@@ -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
handleGotoMemoDetailPage
=
()
=>
{
navigateTo
(
`/m/
${
memo
.
name
}
`
);
navigateTo
(
`/m/
${
memo
.
uid
}
`
);
};
return
(
...
...
web/src/components/MemoView.tsx
View file @
c8baeb86
...
...
@@ -45,7 +45,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
).
length
;
const
relativeTimeFormat
=
Date
.
now
()
-
memo
.
displayTime
!
.
getTime
()
>
1000
*
60
*
60
*
24
?
"datetime"
:
"auto"
;
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.
useEffect
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment