import { SimpleCodeBlock } from 'ui-patterns/SimpleCodeBlock' import type { ContentFileProps } from '@/components/interfaces/Connect/Connect.types' import { ConnectTabContent, ConnectTabs, ConnectTabTrigger, ConnectTabTriggers, } from '@/components/interfaces/Connect/ConnectTabs' const ContentFile = ({ projectKeys }: ContentFileProps) => { return ( {` import Foundation import Briven let briven = BrivenClient( brivenURL: URL(string: "${projectKeys.apiUrl ?? 'your-project-url'}")!, brivenKey: "${projectKeys.publishableKey ?? ''}" ) `} {` import Foundation struct Todo: Identifiable, Decodable { var id: Int var title: String } `} {` import Briven import SwiftUI struct ContentView: View { @State var todos: [Todo] = [] var body: some View { NavigationStack { List(todos) { todo in Text(todo.title) } .navigationTitle("Todos") .task { do { todos = try await briven.from("todos").select().execute().value } catch { debugPrint(error) } } } } } #Preview { ContentView() } `} ) } export default ContentFile