mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: update activity publish state in assignment page
This commit is contained in:
parent
d0c2adf580
commit
6cb738a8a2
3 changed files with 6 additions and 9 deletions
|
|
@ -65,6 +65,7 @@ function ActivityElement(props: ActivitiyElementProps) {
|
|||
async function changePublicStatus() {
|
||||
await updateActivity(
|
||||
{
|
||||
...props.activity,
|
||||
published: !props.activity.published,
|
||||
},
|
||||
props.activity.activity_uuid,
|
||||
|
|
@ -82,8 +83,8 @@ function ActivityElement(props: ActivitiyElementProps) {
|
|||
) {
|
||||
setSelectedActivity(undefined)
|
||||
let modifiedActivityCopy = {
|
||||
...props.activity,
|
||||
name: modifiedActivity.activityName,
|
||||
description: '',
|
||||
}
|
||||
|
||||
await updateActivity(modifiedActivityCopy, activityUUID, access_token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue