I want to display data in a table in issueglance i am unable to do it

Ankit kharola
Contributor
October 14, 2024

 

 

import { Table, Head, Cell, Text, Row } from '@forge/react';
import React, { useState, useEffect } from 'react';

const issues = [
  {
    key: 'XEN-1',
    status: 'In Progress',
  },
  {
    key: 'XEN-2',
    status: 'To Do',
  },
];
const TableIssues = () => (
  <Table>
    <Head>
      <Cell>
        <Text>Issue Key</Text>
      </Cell>
      <Cell>
        <Text>Status</Text>
      </Cell>
    </Head>
    {issues.map(issue => (
      <Row >
        <Cell>
          <Text>{issue.key}</Text>
        </Cell>
        <Cell>
          <Text>{issue.status}</Text>
        </Cell>
      </Row>
    ))}
  </Table>
);


export default TableIssues

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2024

Hi @Ankit kharola 

Welcome to the Community!

What error are you getting? Could you elaborate please?

At first glance I'd say, React requires a unique key. You should add a key to the Row component inside the .map method.

Also make sure that you're using the issueglance module properly in your manifest file.

Last, I'd recommend the Atlassian Developer Community for this sort of questions as you'll receive more responses there.

Ankit kharola
Contributor
October 29, 2024

There is a problem with your account. Please contact the site's administrator.  on the atlassion developer community while trying to signup or login i am not able to 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events