aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-03-17 16:49:13 -0400
committerljungster <parkerljung@gmail.com>2022-03-17 16:49:13 -0400
commit87ecbf85db2e1d51c0bab92154500548942fac22 (patch)
tree6383d335e3d6a389ae0fb83be535aaa5afb0fbfd /src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx
parent3d8ed6f4fd23f65b43cff9eeb7dd91589e496697 (diff)
parent73ba1a0395167ab5949f71d0c82fa7188d37ab5c (diff)
Merge remote-tracking branch 'origin/speedups2' into parker
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx
index a439a7998..c2bb3b3ac 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaCells.tsx
@@ -2,19 +2,18 @@ import React = require("react");
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { action, computed, observable } from "mobx";
import { observer } from "mobx-react";
+import { extname } from "path";
import DatePicker from "react-datepicker";
-import "react-datepicker/dist/react-datepicker.css";
import { CellInfo } from "react-table";
-import "react-table/react-table.css";
import { DateField } from "../../../../fields/DateField";
import { Doc, DocListCast, Field, Opt } from "../../../../fields/Doc";
import { Id } from "../../../../fields/FieldSymbols";
import { List } from "../../../../fields/List";
import { SchemaHeaderField } from "../../../../fields/SchemaHeaderField";
import { ComputedField } from "../../../../fields/ScriptField";
-import { BoolCast, Cast, DateCast, FieldValue, NumCast, StrCast } from "../../../../fields/Types";
+import { BoolCast, Cast, DateCast, FieldValue, StrCast } from "../../../../fields/Types";
import { ImageField } from "../../../../fields/URLField";
-import { Utils, emptyFunction } from "../../../../Utils";
+import { emptyFunction, Utils } from "../../../../Utils";
import { Docs } from "../../../documents/Documents";
import { DocumentType } from "../../../documents/DocumentTypes";
import { DocumentManager } from "../../../util/DocumentManager";
@@ -29,9 +28,8 @@ import { EditableView } from "../../EditableView";
import { MAX_ROW_HEIGHT } from '../../global/globalCssVariables.scss';
import { DocumentIconContainer } from "../../nodes/DocumentIcon";
import { OverlayView } from "../../OverlayView";
-import "./CollectionSchemaView.scss";
import { CollectionView } from "../CollectionView";
-const path = require('path');
+import "./CollectionSchemaView.scss";
// intialize cell properties
export interface CellProps {
@@ -495,8 +493,8 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell {
if (url.href.indexOf(window.location.origin) === -1) return Utils.CorsProxy(url.href); // otherwise, put it through the cors proxy erver
if (!/\.(png|jpg|jpeg|gif|webp)$/.test(url.href.toLowerCase())) return url.href;//Why is this here — good question
- const ext = path.extname(url.href); // the extension of the file
- return url.href.replace(ext, "_o" + path.extname(url.href));
+ const ext = extname(url.href);
+ return url.href.replace(ext, "_o" + ext);
}
render() {