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
3822c26e
Commit
3822c26e
authored
Oct 09, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update memo props
parent
425b43b3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
14 deletions
+6
-14
Memo.tsx
web/src/components/Memo.tsx
+0
-8
MemoList.tsx
web/src/components/MemoList.tsx
+1
-1
Explore.tsx
web/src/pages/Explore.tsx
+1
-1
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+4
-4
No files found.
web/src/components/Memo.tsx
View file @
3822c26e
...
@@ -25,7 +25,6 @@ import "@/less/memo.less";
...
@@ -25,7 +25,6 @@ import "@/less/memo.less";
interface
Props
{
interface
Props
{
memo
:
Memo
;
memo
:
Memo
;
showVisibility
?:
boolean
;
showVisibility
?:
boolean
;
showCommentEntry
?:
boolean
;
lazyRendering
?:
boolean
;
lazyRendering
?:
boolean
;
}
}
...
@@ -280,13 +279,6 @@ const Memo: React.FC<Props> = (props: Props) => {
...
@@ -280,13 +279,6 @@ const Memo: React.FC<Props> = (props: Props) => {
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
{
memo
.
parent
&&
props
.
showCommentEntry
&&
(
<
div
>
<
Link
to=
{
`/m/${memo.parent.id}`
}
>
<
span
className=
"text-xs text-gray-400 opacity-80"
>
This is a comment of #
{
memo
.
parent
.
id
}
</
span
>
</
Link
>
</
div
>
)
}
<
MemoContent
<
MemoContent
content=
{
memo
.
content
}
content=
{
memo
.
content
}
onMemoContentClick=
{
handleMemoContentClick
}
onMemoContentClick=
{
handleMemoContentClick
}
...
...
web/src/components/MemoList.tsx
View file @
3822c26e
...
@@ -133,7 +133,7 @@ const MemoList: React.FC = () => {
...
@@ -133,7 +133,7 @@ const MemoList: React.FC = () => {
return (
return (
<
div
className=
"memo-list-container"
>
<
div
className=
"memo-list-container"
>
{
sortedMemos
.
map
((
memo
)
=>
(
{
sortedMemos
.
map
((
memo
)
=>
(
<
Memo
key=
{
`${memo.id}-${memo.displayTs}`
}
memo=
{
memo
}
lazyRendering
showVisibility
showCommentEntry
/>
<
Memo
key=
{
`${memo.id}-${memo.displayTs}`
}
memo=
{
memo
}
lazyRendering
showVisibility
/>
))
}
))
}
{
isFetching
?
(
{
isFetching
?
(
<
div
className=
"status-text-container fetching-tip"
>
<
div
className=
"status-text-container fetching-tip"
>
...
...
web/src/pages/Explore.tsx
View file @
3822c26e
...
@@ -93,7 +93,7 @@ const Explore = () => {
...
@@ -93,7 +93,7 @@ const Explore = () => {
<
div
className=
"relative w-full h-auto flex flex-col justify-start items-start"
>
<
div
className=
"relative w-full h-auto flex flex-col justify-start items-start"
>
<
MemoFilter
/>
<
MemoFilter
/>
{
sortedMemos
.
map
((
memo
)
=>
{
{
sortedMemos
.
map
((
memo
)
=>
{
return
<
Memo
key=
{
`${memo.id}-${memo.displayTs}`
}
memo=
{
memo
}
showCommentEntry
/>;
return
<
Memo
key=
{
`${memo.id}-${memo.displayTs}`
}
memo=
{
memo
}
/>;
})
}
})
}
{
isComplete
?
(
{
isComplete
?
(
sortedMemos
.
length
===
0
&&
(
sortedMemos
.
length
===
0
&&
(
...
...
web/src/pages/MemoDetail.tsx
View file @
3822c26e
...
@@ -119,16 +119,16 @@ const MemoDetail = () => {
...
@@ -119,16 +119,16 @@ const MemoDetail = () => {
<
span
className=
"text-gray-400 dark:text-gray-400"
>
#
{
memo
.
id
}
</
span
>
<
span
className=
"text-gray-400 dark:text-gray-400"
>
#
{
memo
.
id
}
</
span
>
</
Tooltip
>
</
Tooltip
>
</
div
>
</
div
>
<
MemoContent
content=
{
memo
.
content
}
/>
<
MemoResourceListView
resourceList=
{
memo
.
resourceList
}
/>
<
MemoRelationListView
relationList=
{
referenceRelations
}
/>
{
memo
.
parent
&&
(
{
memo
.
parent
&&
(
<
div
className=
"
mb
-2"
>
<
div
className=
"
w-full mt
-2"
>
<
Link
to=
{
`/m/${memo.parent.id}`
}
>
<
Link
to=
{
`/m/${memo.parent.id}`
}
>
<
span
className=
"text-xs text-gray-400 opacity-80"
>
This is a comment of #
{
memo
.
parent
.
id
}
</
span
>
<
span
className=
"text-xs text-gray-400 opacity-80"
>
This is a comment of #
{
memo
.
parent
.
id
}
</
span
>
</
Link
>
</
Link
>
</
div
>
</
div
>
)
}
)
}
<
MemoContent
content=
{
memo
.
content
}
/>
<
MemoResourceListView
resourceList=
{
memo
.
resourceList
}
/>
<
MemoRelationListView
relationList=
{
referenceRelations
}
/>
<
div
className=
"w-full mt-4 flex flex-col sm:flex-row justify-start sm:justify-between sm:items-center gap-2"
>
<
div
className=
"w-full mt-4 flex flex-col sm:flex-row justify-start sm:justify-between sm:items-center gap-2"
>
<
div
className=
"flex flex-row justify-start items-center"
>
<
div
className=
"flex flex-row justify-start items-center"
>
<
Link
to=
{
`/u/${encodeURIComponent(memo.creatorUsername)}`
}
>
<
Link
to=
{
`/u/${encodeURIComponent(memo.creatorUsername)}`
}
>
...
...
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