Skip to content

Commit

Permalink
refactor(backoffice-v2): no longer using the same accessor multiple t…
Browse files Browse the repository at this point in the history
…imes
  • Loading branch information
Omri-Levy committed May 23, 2024
1 parent 842ac68 commit 6aaceaf
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,27 @@ export const columns = [
},
header: 'Created At',
}),
columnHelper.accessor('additionalInfo', {
columnHelper.accessor('additionalInfo.businessCompanyName', {
cell: info => {
const { businessCompanyName } = info.getValue();
const businessCompanyName = info.getValue();

return (
<span className={`whitespace-nowrap font-semibold`}>{valueOrNA(businessCompanyName)}</span>
);
},
header: 'Business',
}),
columnHelper.accessor('additionalInfo', {
columnHelper.accessor('additionalInfo.alertReason', {
cell: info => {
const { alertReason } = info.getValue();
const alertReason = info.getValue();

return <div className="min-w-[250px] font-semibold">{alertReason}</div>;
},
header: 'Reason',
}),
columnHelper.accessor('additionalInfo', {
columnHelper.accessor('additionalInfo.severity', {
cell: info => {
const { severity } = info.getValue();
const severity = info.getValue();

return (
<TextWithNAFallback
Expand All @@ -84,9 +84,9 @@ export const columns = [
},
header: 'Severity',
}),
columnHelper.accessor('additionalInfo', {
columnHelper.accessor('additionalInfo.riskScore', {
cell: info => {
const { riskScore } = info.getValue();
const riskScore = info.getValue();
const severity = getSeverityFromRiskScore(riskScore);

return (
Expand Down

0 comments on commit 6aaceaf

Please sign in to comment.