Created
July 4, 2025 11:17
-
-
Save jacobsapps/163a3e7846812e8737e83b0718481e7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GenerationView.swift | |
| Button { | |
| viewModel.saveCard() | |
| } | |
| // ... | |
| // GenerationViewModel.swift | |
| func saveCard() { | |
| guard let card else { return } | |
| let entity = CardEntity.from(card) | |
| try? database?.create(entity) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment