Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Nov 7, 2024
1 parent 6760af5 commit afc961f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import type { ICompactTableFormatterProps } from './types';

export const FormatJsonParse = () => {
const Component = ({ value }: ICompactTableFormatterProps) => {
const valueString = typeof value === 'string' ? JSON.parse(value) : value;
let v = value;
if (typeof value === 'string') {
v = !!value && value?.length > 0 ? JSON.parse(value) : value;
}

return (
<Text variant="code" className={dataFieldClass}>
{!!value && value?.length > 0 ? JSON.parse(valueString) : value}
{v}
</Text>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { MonoAirlineStops } from '@kadena/kode-icons/system';
import React from 'react';
import type { ICompactTableFormatterProps } from './types';
import { valueToString } from './utils';

export const FormatMultiStepTx = () => {
const Component = ({ value }: ICompactTableFormatterProps) => {
return value ? <MonoAirlineStops title="Multistep Tx" /> : undefined;
return valueToString(value) ? (
<MonoAirlineStops title="Multistep Tx" />
) : undefined;
};
return Component;
};

0 comments on commit afc961f

Please sign in to comment.