feat: show revenue amount on event list (if revenue)
This commit is contained in:
@@ -27,7 +27,7 @@ export function useColumns() {
|
||||
accessorKey: 'name',
|
||||
header: 'Name',
|
||||
cell({ row }) {
|
||||
const { name, path, duration, properties } = row.original;
|
||||
const { name, path, duration, properties, revenue } = row.original;
|
||||
const renderName = () => {
|
||||
if (name === 'screen_view') {
|
||||
if (path.includes('/')) {
|
||||
@@ -42,6 +42,10 @@ export function useColumns() {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'revenue' && revenue) {
|
||||
return `${name} (${number.currency(revenue / 100)})`;
|
||||
}
|
||||
|
||||
return name.replace(/_/g, ' ');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user