Socialcademy 10: Adding Comments - Can't see the NewCommentForm

Hello everyone!

I’m trying to implement adding a new comment to a post but I can’t see the TextField nor the ‘paperplane’ button.

This is what I’m supposed to be getting:

But this is what I’m getting:

Any ideas on what might be failing? I’ve check everything in my code but I can’t find the problem
This is the link:

Thanks in advance for your help.

1 Like

I’m getting the same issue. With the downloaded code too. You ever figure it out?

I figured it out! You need to wrap the group using a NavigationView, then place the toolbar inside. Here is the code:

struct CommentsList: View {
@StateObject var viewModel: CommentsViewModel
@State private var isCommentsListDisabled = true

var body: some View {

        Group {
            switch viewModel.comments {
            case .loading:
                    .onAppear {
            case let .error(error):
                    title: "Cannot Load Comments",
                    message: error.localizedDescription,
                    retryAction: {
            case .empty:
                    title: "No Comments",
                    message: "Be the first to leave a comment."
            case let .loaded(comments):
                List(comments) { comment in
                    CommentRow(viewModel: viewModel.makeCommentRowViewModel(for: comment))
                  //    .padding(.bottom, 10) // use this for white background
                .animation(.default, value: comments)
        .toolbar {
            ToolbarItem(placement: .bottomBar) {
                NewCommentForm(viewModel: viewModel.makeNewCommentViewModel())
                    .padding(.bottom, 20)



Thanks for sharing! This was driving me insane. I don’t know if any of you encounter this problem too.

My profile pic will never show up. I have tried with simulator and on iPhone, I thought it might be the connection, but nope.