Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
elewis2 committed May 3, 2024
1 parent db43555 commit 0a73e24
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/components/DetailChip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ function DetailChip(props: DetailChipProps) {
} = props;

const [anchorEl, setAnchorEl] = useState(null);

/**
* Closes popover.
*/
Expand Down
1 change: 0 additions & 1 deletion src/components/DetailDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function DetailDrawer(props: DetailDrawerProps) {
onClose,
isEdge,
} = props;

const auth = useAuth();

const [opened, setOpened] = useState([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const StatementReview = ({
if (record && record['@rid']) {
return record['@rid'];
}

return `${record}`;
}}
/>
Expand Down
2 changes: 0 additions & 2 deletions src/components/FormField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ const FormField = ({
iterable,
format,
} = model;

// TODO: check again for any other uses of linkedClass
let linkedClass;

if (typeof linkedClassName === 'string') {
Expand Down
3 changes: 1 addition & 2 deletions src/components/FormLayout/FieldGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ const FieldGroup = ({
}: FieldGroupProps) => {
const { formVariant, formContent } = useContext(FormContext);
let properties;

if (model.name) {
properties = schemaDefn.getProperties(model.name);
} else {
properties = model.properties; // TODO Field Group is used by passing props in some cases
properties = model.properties; // Field Group is used by passing props in some cases
}

// get the form content
Expand Down
1 change: 0 additions & 1 deletion src/components/ModelSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const ModelSelect = ({
const model = value || defaultValue;

useEffect(() => {
// TODO: descendants returns what if model name is not found?
const models = schemaDefn.descendants(baseModel || '', { excludeAbstract: !includeAbstract, includeSelf: true }).map((m) => ({
label: m, value: m, caption: schemaDefn.get(m).description, key: m,
})).sort((m1, m2) => m1.label.localeCompare(m2.label));
Expand Down
1 change: 0 additions & 1 deletion src/components/VariantForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ const VariantForm = ({
onSubmit, onError, value, formVariant,
}: VariantFormProps) => {
let defaultCoordinateType;

if (value.break1Start) {
defaultCoordinateType = value.break1Start['@class'];
}
Expand Down
1 change: 0 additions & 1 deletion src/components/hooks/useSchemaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const useSchemaForm = (

const formValidator = useCallback((propName, propValue) => {
const prop = fieldDefs[propName];

if (prop) {
return schema.validateValue(prop, propValue, { ignoreMandatory: ignoreMandatoryErrors });
}
Expand Down

0 comments on commit 0a73e24

Please sign in to comment.