Skip to content

Commit

Permalink
little error handling. Still render page if theres an error, but give…
Browse files Browse the repository at this point in the history
… dialog
  • Loading branch information
ssb-jnk committed Feb 26, 2024
1 parent a7f4c7d commit febd4e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/TeamMembers/TeamMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export default function TeamMembers() {

function renderErrorAlert() {
return (
<Dialog type='warning' title='Could not fetch teams'>
{error?.error.message}
<Dialog type='warning' title='Could not fetch users'>
{error}
</Dialog>
)
}
Expand Down Expand Up @@ -142,8 +142,8 @@ export default function TeamMembers() {
{teamMembersTableData.length > 0 ? (
<Table columns={teamMembersTableHeaderColumns} data={teamMembersTableData as TableData['data']} />
) : (
<Dialog type='warning' title='Ingen team funnet'>
Du er ikke manager i noen dapla-team
<Dialog type='warning' title='No team members found'>
You are not a manager in any dapla-team
</Dialog>
)}
</>
Expand Down

0 comments on commit febd4e4

Please sign in to comment.