()
| 28 | } |
| 29 | |
| 30 | const handleCreateProject = () => { |
| 31 | if (newProjectName.trim() && session) { |
| 32 | projectCollection.insert({ |
| 33 | id: Math.floor(Math.random() * 100000), |
| 34 | name: newProjectName.trim(), |
| 35 | description: ``, |
| 36 | owner_id: session.user.id, |
| 37 | shared_user_ids: [], |
| 38 | created_at: new Date(), |
| 39 | updated_at: new Date(), |
| 40 | }) |
| 41 | setNewProjectName(``) |
| 42 | setShowNewProjectForm(false) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | if (isPending) { |
| 47 | return null |
no test coverage detected