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
1dc4f02b
Commit
1dc4f02b
authored
Jan 27, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update memo requests
parent
8db90a04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
Explore.tsx
web/src/pages/Explore.tsx
+4
-2
Home.tsx
web/src/pages/Home.tsx
+4
-2
Timeline.tsx
web/src/pages/Timeline.tsx
+4
-2
UserProfile.tsx
web/src/pages/UserProfile.tsx
+4
-2
No files found.
web/src/pages/Explore.tsx
View file @
1dc4f02b
...
@@ -24,6 +24,7 @@ const Explore = () => {
...
@@ -24,6 +24,7 @@ const Explore = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
nextPageTokenRef
.
current
=
undefined
;
nextPageTokenRef
.
current
=
undefined
;
memoList
.
reset
();
fetchMemos
();
fetchMemos
();
},
[
tagQuery
,
textQuery
]);
},
[
tagQuery
,
textQuery
]);
...
@@ -58,8 +59,9 @@ const Explore = () => {
...
@@ -58,8 +59,9 @@ const Explore = () => {
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showCreator
/>
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showCreator
/>
))
}
))
}
{
isRequesting
?
(
{
isRequesting
?
(
<
div
className=
"flex flex-col justify-start items-center w-full my-4"
>
<
div
className=
"flex flex-row justify-center items-center w-full my-4 text-gray-400"
>
<
p
className=
"text-sm text-gray-400 italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
<
Icon
.
Loader
className=
"w-4 h-auto animate-spin mr-1"
/>
<
p
className=
"text-sm italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
</
div
>
</
div
>
)
:
!
nextPageTokenRef
.
current
?
(
)
:
!
nextPageTokenRef
.
current
?
(
sortedMemos
.
length
===
0
&&
(
sortedMemos
.
length
===
0
&&
(
...
...
web/src/pages/Home.tsx
View file @
1dc4f02b
...
@@ -34,6 +34,7 @@ const Home = () => {
...
@@ -34,6 +34,7 @@ const Home = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
nextPageTokenRef
.
current
=
undefined
;
nextPageTokenRef
.
current
=
undefined
;
memoList
.
reset
();
fetchMemos
();
fetchMemos
();
},
[
tagQuery
,
textQuery
]);
},
[
tagQuery
,
textQuery
]);
...
@@ -75,8 +76,9 @@ const Home = () => {
...
@@ -75,8 +76,9 @@ const Home = () => {
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showVisibility
showPinned
/>
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showVisibility
showPinned
/>
))
}
))
}
{
isRequesting
?
(
{
isRequesting
?
(
<
div
className=
"flex flex-col justify-start items-center w-full my-4"
>
<
div
className=
"flex flex-row justify-center items-center w-full my-4 text-gray-400"
>
<
p
className=
"text-sm text-gray-400 italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
<
Icon
.
Loader
className=
"w-4 h-auto animate-spin mr-1"
/>
<
p
className=
"text-sm italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
</
div
>
</
div
>
)
:
!
nextPageTokenRef
.
current
?
(
)
:
!
nextPageTokenRef
.
current
?
(
sortedMemos
.
length
===
0
&&
(
sortedMemos
.
length
===
0
&&
(
...
...
web/src/pages/Timeline.tsx
View file @
1dc4f02b
...
@@ -60,6 +60,7 @@ const Timeline = () => {
...
@@ -60,6 +60,7 @@ const Timeline = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
nextPageTokenRef
.
current
=
undefined
;
nextPageTokenRef
.
current
=
undefined
;
memoList
.
reset
();
fetchMemos
();
fetchMemos
();
},
[
selectedDay
,
tagQuery
,
textQuery
]);
},
[
selectedDay
,
tagQuery
,
textQuery
]);
...
@@ -180,8 +181,9 @@ const Timeline = () => {
...
@@ -180,8 +181,9 @@ const Timeline = () => {
</
Fragment
>
</
Fragment
>
))
}
))
}
{
isRequesting
?
(
{
isRequesting
?
(
<
div
className=
"flex flex-col justify-start items-center w-full my-4"
>
<
div
className=
"flex flex-row justify-center items-center w-full my-4 text-gray-400"
>
<
p
className=
"text-sm text-gray-400 italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
<
Icon
.
Loader
className=
"w-4 h-auto animate-spin mr-1"
/>
<
p
className=
"text-sm italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
</
div
>
</
div
>
)
:
!
nextPageTokenRef
.
current
?
(
)
:
!
nextPageTokenRef
.
current
?
(
sortedMemos
.
length
===
0
&&
(
sortedMemos
.
length
===
0
&&
(
...
...
web/src/pages/UserProfile.tsx
View file @
1dc4f02b
...
@@ -55,6 +55,7 @@ const UserProfile = () => {
...
@@ -55,6 +55,7 @@ const UserProfile = () => {
}
}
nextPageTokenRef
.
current
=
undefined
;
nextPageTokenRef
.
current
=
undefined
;
memoList
.
reset
();
fetchMemos
();
fetchMemos
();
},
[
user
,
tagQuery
,
textQuery
]);
},
[
user
,
tagQuery
,
textQuery
]);
...
@@ -109,8 +110,9 @@ const UserProfile = () => {
...
@@ -109,8 +110,9 @@ const UserProfile = () => {
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showVisibility
showPinned
/>
<
MemoView
key=
{
`${memo.id}-${memo.displayTime}`
}
memo=
{
memo
}
showVisibility
showPinned
/>
))
}
))
}
{
isRequesting
?
(
{
isRequesting
?
(
<
div
className=
"flex flex-col justify-start items-center w-full my-4"
>
<
div
className=
"flex flex-row justify-center items-center w-full my-4 text-gray-400"
>
<
p
className=
"text-sm text-gray-400 italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
<
Icon
.
Loader
className=
"w-4 h-auto animate-spin mr-1"
/>
<
p
className=
"text-sm italic"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
</
div
>
</
div
>
)
:
!
nextPageTokenRef
.
current
?
(
)
:
!
nextPageTokenRef
.
current
?
(
sortedMemos
.
length
===
0
&&
(
sortedMemos
.
length
===
0
&&
(
...
...
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