1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

new folder modalにcolor select追加

This commit is contained in:
Rokt33r
2015-11-15 20:32:02 +09:00
parent da9d7a4336
commit 26a08fac06
5 changed files with 71 additions and 18 deletions

View File

@@ -26,9 +26,7 @@ function folders (state = initialFolders, action) {
Object.assign(newFolder, {
key: keygen(),
createdAt: new Date(),
updatedAt: new Date(),
// random number (0-7)
color: Math.round(Math.random() * 7)
updatedAt: new Date()
})
if (newFolder.length === 0) throw new Error('Folder name is required')