()
| 50 | const placeholder = "New page"; |
| 51 | |
| 52 | const pickCover = async () => { |
| 53 | let result = await ImagePicker.launchImageLibraryAsync({ |
| 54 | mediaTypes: ['images'], |
| 55 | allowsEditing: false, |
| 56 | quality: 1, |
| 57 | }); |
| 58 | |
| 59 | if (!result.canceled) { |
| 60 | setPageCover(result.assets[0].uri); |
| 61 | |
| 62 | const updatedBlock = updateBlockData(blocks[blockId], { |
| 63 | format: { |
| 64 | page_cover: result.assets[0].uri |
| 65 | /* page_cover_position */ |
| 66 | } |
| 67 | }); |
| 68 | |
| 69 | updateBlock(updatedBlock); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | const pickIcon = async () => { |
| 74 | let result = await ImagePicker.launchImageLibraryAsync({ |
nothing calls this directly
no test coverage detected