diff options
author | crupest <crupest@outlook.com> | 2021-01-11 21:58:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 21:58:32 +0800 |
commit | 5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe (patch) | |
tree | d635081fb6eaa0222270bfb4ac29906fb767a9bd /FrontEnd/src/app/views/home/BoardWithUser.tsx | |
parent | 777efa6e0405f4e871de4da21b939e30ed07f754 (diff) | |
parent | 26f02d90c2571251b32c3b03b970dd290e3892e6 (diff) | |
download | timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.tar.gz timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.tar.bz2 timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.zip |
Merge pull request #206 from crupest/front-dev
Front development.
Diffstat (limited to 'FrontEnd/src/app/views/home/BoardWithUser.tsx')
-rw-r--r-- | FrontEnd/src/app/views/home/BoardWithUser.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/FrontEnd/src/app/views/home/BoardWithUser.tsx b/FrontEnd/src/app/views/home/BoardWithUser.tsx index 8afe440b..ba22916c 100644 --- a/FrontEnd/src/app/views/home/BoardWithUser.tsx +++ b/FrontEnd/src/app/views/home/BoardWithUser.tsx @@ -20,11 +20,11 @@ const BoardWithUser: React.FC<{ user: AuthUser }> = ({ user }) => { <Col xs="12" md="6"> <TimelineBoard title={t("home.bookmarkTimeline")} - load={() => getHttpBookmarkClient().list(user.token)} + load={() => getHttpBookmarkClient().list()} editHandler={{ onDelete: (timeline) => { return getHttpBookmarkClient() - .delete(timeline, user.token) + .delete(timeline) .catch((e) => { pushAlert({ message: { @@ -39,8 +39,7 @@ const BoardWithUser: React.FC<{ user: AuthUser }> = ({ user }) => { onMove: (timeline, index, offset) => { return getHttpBookmarkClient() .move( - { timeline, newPosition: index + offset + 1 }, // +1 because backend contract: index starts at 1 - user.token + { timeline, newPosition: index + offset + 1 } // +1 because backend contract: index starts at 1 ) .catch((e) => { pushAlert({ @@ -75,7 +74,7 @@ const BoardWithUser: React.FC<{ user: AuthUser }> = ({ user }) => { ? { onDelete: (timeline) => { return getHttpHighlightClient() - .delete(timeline, user.token) + .delete(timeline) .catch((e) => { pushAlert({ message: { @@ -90,8 +89,7 @@ const BoardWithUser: React.FC<{ user: AuthUser }> = ({ user }) => { onMove: (timeline, index, offset) => { return getHttpHighlightClient() .move( - { timeline, newPosition: index + offset + 1 }, // +1 because backend contract: index starts at 1 - user.token + { timeline, newPosition: index + offset + 1 } // +1 because backend contract: index starts at 1 ) .catch((e) => { pushAlert({ |