Last active
May 1, 2024 20:07
-
-
Save apatronl/0227013e10273e12e14065b4246aebe8 to your computer and use it in GitHub Desktop.
This file contains 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
@MainActor | |
struct ChatView: View { | |
@Bindable private var viewModel: ChatViewModel = ChatViewModel() | |
var body: some View { | |
NavigationStack { | |
VStack { | |
ChatMessagesList(viewModel: viewModel) | |
HStack { | |
MessageTextField(draftMessage: $viewModel.draftMessage) | |
SendMessageButton { | |
viewModel.sendMessage() | |
} | |
} | |
.padding(8) | |
} | |
.navigationTitle("Chat") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment