Skip to content

Commit

Permalink
[UIE-120] Replaced Utils with terra-ui-packages equivalents. (#4610)
Browse files Browse the repository at this point in the history
  • Loading branch information
evrii authored Jan 26, 2024
1 parent dd55467 commit 41a98d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ErrorView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { cond, maybeParseJSON } from '@terra-ui-packages/core-utils';
import _ from 'lodash/fp';
import { Fragment } from 'react';
import { div, h, iframe } from 'react-hyperscript-helpers';
import colors from 'src/libs/colors';
import * as Style from 'src/libs/style';
import * as Utils from 'src/libs/utils';

export const styles = {
htmlFrame: {
Expand All @@ -26,13 +26,13 @@ export const styles = {

const ErrorView = ({ error }) => {
return div({ style: { marginTop: '1rem' } }, [
Utils.cond(
cond(
[_.isError(error), () => error.message],
[
_.isString(error),
() => {
const json = Utils.maybeParseJSON(error);
return Utils.cond(
const json = maybeParseJSON(error);
return cond(
[
error[0] === '<',
() => {
Expand Down

0 comments on commit 41a98d2

Please sign in to comment.