WaspW
Wasp16mo ago
Anddy

how can i get a communities name

based off this
function MainPage() {
  // ...
  return (
    <div className="tasks">
      {tasks.map((task) => (
        <div key={task.id} className="task">
          {task.title} by {task.user.auth?.identities[0].providerUserId}
        </div>
      ))}
    </div>
  )
} 


i am doing this in my tsx
        <div>
            <h1>Dashboard</h1>
            <p>Number of racks: {racks.length}</p>
            
            {racks.map((rack) => (
                <div key={rack.id}>
                    <p>{rack.name}</p>
                    <p>{rack.community.name}</p>
                    <p>{rack.createdById}</p>
                </div>
            ))}
        </div>


i have the rack in my console log and it is showing the right amount of racks.. just nott getting the communities name
Was this page helpful?