Skip to content

Commit

Permalink
feat: enable apps to change their settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Torrent committed Jan 14, 2022
1 parent fb05654 commit 4a1c692
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/components/item/ItemContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const ItemContent = ({ item, enableEdition }) => {
const classes = useStyles();
const itemId = item.get(ITEM_KEYS.ID);
const itemType = item?.get(ITEM_KEYS.TYPE);
const { mutate: editItem } = useMutation(MUTATION_KEYS.EDIT_ITEM);
const { mutate: editItem, mutateAsync: editItemAsync } = useMutation(
MUTATION_KEYS.EDIT_ITEM,
);
const { editingItemId, setEditingItemId } = useContext(LayoutContext);

// provide user to app
Expand Down Expand Up @@ -133,6 +135,7 @@ const ItemContent = ({ item, enableEdition }) => {
editCaption={isEditing}
onSaveCaption={onSaveCaption}
saveButtonId={saveButtonId}
onSettingsUpdate={editItemAsync}
user={user}
height={ITEM_DEFAULT_HEIGHT}
mode={enableEdition ? APP_MODES.TEACHER : APP_MODES.STUDENT}
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7735,9 +7735,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.3.564, electron-to-chromium@npm:^1.4.17":
version: 1.4.43
resolution: "electron-to-chromium@npm:1.4.43"
checksum: c096a42ec6af0c22736f7151d1386e6597b125ad9a6379a747e67d33d03b3b2923336dbe17edad0037299e7aa1daa0f3feb726d797375e652b6918c1a467b39a
version: 1.4.45
resolution: "electron-to-chromium@npm:1.4.45"
checksum: 8afc465bfe4873701c748626bcd3081976526b3cd9cf4b098b0a1ad90bd2be5f4933ddf1e061cc140d2793146f0901f2b96996aaecd726d0abdebcaf5d3bdbaa
languageName: node
linkType: hard

Expand Down Expand Up @@ -16563,12 +16563,12 @@ __metadata:
linkType: hard

"regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.3.1":
version: 1.3.1
resolution: "regexp.prototype.flags@npm:1.3.1"
version: 1.4.1
resolution: "regexp.prototype.flags@npm:1.4.1"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
checksum: 343595db5a6bbbb3bfbda881f9c74832cfa9fc0039e64a43843f6bb9158b78b921055266510800ed69d4997638890b17a46d55fd9f32961f53ae56ac3ec4dd05
checksum: 77944a3ea5ae84f391fa80bff9babfedc47eadc9dc38e282b5fd746368fb787deec89c68ce3114195bf6b5782b160280a278b62d41ccc6e125afab1a7f816de8
languageName: node
linkType: hard

Expand Down

0 comments on commit 4a1c692

Please sign in to comment.