XCode - History of Code Project duplicate answers

Hi Everyone,

I recently started the swfit career path and have been working my way through the off platform “xcode” project called history of code. After amending part of the code to so that it fits the DRY principal, it seems that every answer is duplicated but cannot seem to find the duplication in my code. Can anyone tell me where I’m going wrong?

//
// ContentView.swift
// test
//
// Created by Josh on 15/06/2024.
//

import SwiftUI

struct ContentView: View {
let mainColor = Color(red: 20/255, green: 28/255, blue: 58/255)
let accentColor = Color(red: 48/255, green: 105/255, blue: 240/255)
var body: some View {
ZStack {
mainColor.ignoresSafeArea()
VStack {
Text(“1/10”)
.font(.callout)
.multilineTextAlignment(.leading)
.padding()
Text(questionOne.questionText)
.font(.largeTitle)
.bold()
.multilineTextAlignment(.leading)
Spacer()
HStack {
Button(action: {
print(“Tapped on choice 1”)
}, label: {
ChoiceTextiew(choiceText: questionOne.possibleAnswers[0])
})
Button(action: {
print(“Tapped on choice 2”)
}, label: {
ChoiceTextiew(choiceText: questionOne.possibleAnswers[1])
})
Button(action: {
print(“Tapped on choice 3”)
}, label: {
ChoiceTextiew(choiceText: questionOne.possibleAnswers[2])
})
Button(action: {
print(“Tapped on choice 4”)
}, label: {
ChoiceTextiew(choiceText: questionOne.possibleAnswers[3])
})
}

        }
    }
    .foregroundColor(.white)
}

}

#Preview {
ContentView()
}

let questionOne = Question(questionText: “What was the first computer bug?”, possibleAnswers: [“Ant”, “Beetle”, “Moth”, “Fly”], correctAnswerIndex: 2
)

import Foundation

struct Question {

let questionText: String

let possibleAnswers: [String]

let correctAnswerIndex: Int

}

import SwiftUI

struct ChoiceTextiew: View {
let choiceText: String
let accentColor = Color(red: 48/255, green: 105/255, blue: 240/255)

var body: some View {
    Text(choiceText)
           Text(choiceText)
             .font(.body)
             .bold()
             .multilineTextAlignment(.center)
             .padding()
             .border(accentColor, width: 4)
}

}

Thank you