Skip to content

Commit

Permalink
now you can update syllabus status
Browse files Browse the repository at this point in the history
  • Loading branch information
alesanchezr committed Sep 10, 2022
1 parent 61e966e commit 9eef621
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/component/topbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export const TopBar = () => {
options={async () => {
return ["DRAFT", "PUBLISHED"].filter(v => v != store.info.version).map(v => ({ label: v, value: v }));
}}
onChange={opt => API.profile(store.info.slug).updateVersion(store.info.version, { status: opt.value })}
onChange={opt =>
API.profile(store.info.slug)
.updateVersion(store.info.version, { status: opt.value })
.then(() => actions.setInfo({ status: opt.value }))
}
/>
</div>
) : (
Expand Down

1 comment on commit 9eef621

@vercel
Copy link

@vercel vercel bot commented on 9eef621 Sep 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.