Skip to content

Commit

Permalink
remove some old pieces of code
Browse files Browse the repository at this point in the history
  • Loading branch information
mtxr committed Mar 19, 2021
1 parent 590a984 commit 44c31df
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
3 changes: 2 additions & 1 deletion docs/src/components/RenderSettings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-ignore
import pkgJson from '../../../../packages/extension/package.json';
import React from 'react';
import get from 'lodash/get';
import pkgJson from '../../../../packages/extension/package.json';
import Setting from './Setting';
import styled from 'styled-components';
import components from '../../components';
Expand Down
36 changes: 28 additions & 8 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,40 @@
"listEmittedFiles": false,
"listFiles": false,
"pretty": true,
"lib": ["es2017", "dom"],
"lib": [
"es2017",
"dom"
],
"declaration": false,
"baseUrl": "./",
"rootDir": "./",
"outDir": "dist",
"typeRoots": ["node_modules/@types", "src/types"],
"typeRoots": [
"node_modules/@types",
"src/types"
],
"resolveJsonModule": true,
"paths": {
"@fonts/*": ["public/fonts/*"],
"@images/*": ["public/images/*"],
"@components/*": ["src/theme/components/*"],
"@styles/*": ["src/theme/styles/*"]
"@fonts/*": [
"public/fonts/*"
],
"@images/*": [
"public/images/*"
],
"@components/*": [
"src/theme/components/*"
],
"@styles/*": [
"src/theme/styles/*"
]
}
},
"include": ["public/*", "src/**/*"],
"exclude": ["node_modules/**"]
"include": [
"public/*",
"src/**/*",
"../packages/extension/package.json"
],
"exclude": [
"node_modules/**"
]
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
import React from 'react';
export const ValueRender = ({ value }) => {
if (value === null)
return <small className='cell-value value-null'>NULL</small>;
if (typeof value === 'number')
return <span className='cell-value value-number'>{value}</span>;
if (value === null) return <small className="cell-value value-null">NULL</small>;
if (typeof value === 'number') return <span className="cell-value value-number">{value}</span>;
if (value === true || value === false)
return <span className={`cell-value value-bool ${value.toString()}`}>{value.toString().toUpperCase()}</span>;
if (typeof value === 'object' || Array.isArray(value)) {
return (<>{JSON.stringify(value, null, 2)}</>);
return <>{JSON.stringify(value, null, 2)}</>;
}
return <>{String(value)}</>;
// DISABLE! Performance issues here
// return <span>
// {
// value.replace(this.state.filtered[r.column.id].regex || this.state.filtered[r.column.id].value, '<###>$1<###>')
// .split('<###>')
// .map((str, i) => {
// if (i % 2 === 1)
// return (
// <mark key={i} className="filter-highlight">
// {str}
// </mark>
// );
// if (str.trim().length === 0) return null;
// return <span key={i}>{str}</span>;
// })
// }
// </span>
};

export default ValueRender;
export default ValueRender;

0 comments on commit 44c31df

Please sign in to comment.