Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Code refactored: resolved PR comments
  • Loading branch information
sayalijoshi27 committed May 10, 2024
commit 1a6e4fb5d1e0ccfd2a4f1a68ac1fb5deeb7917bc
4 changes: 2 additions & 2 deletions ui/src/components/AccountPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const AccountPage = (props: AccountObj): JSX.Element => {
const { heading, subtitle, copyrightText } = props.data;

const currentYear = new Date().getFullYear();
const previousYear = currentYear - 1
const previousYear = currentYear - 1;

return (
// eslint-disable-next-line react/no-unknown-property
Expand All @@ -35,7 +35,7 @@ const AccountPage = (props: AccountObj): JSX.Element => {
<span className="AccountPage__circle AccountPage__circle_seven"></span>
</div>
<div className="AccountPage__action">
<div className="AccountPage__content">{props.children}</div>
<div className="AccountPage__content">{props?.children}</div>
<p className='copyright_text'>{`© ${previousYear}-${currentYear} ${copyrightText}`}</p>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/SchemaModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const getTopLevelIcons = (field: FieldMapType) => {
return icons['reference'];
}

if (!field.ContentstackFieldType) {
if (!field?.ContentstackFieldType) {
return icons['blocks'];
}

Expand All @@ -93,7 +93,7 @@ const TreeView = ({ schema = [] }: schemaType) => {
const data: FieldMapType[] = []
schema?.forEach((field) => {
if (field?.ContentstackFieldType === "group") {
groupId = field.uid
groupId = field?.uid
data?.push({...field, child: []})
}
else{
Expand Down Expand Up @@ -197,7 +197,7 @@ const TreeView = ({ schema = [] }: schemaType) => {
<ul>
{nestedList?.map((item: FieldMapType, index: number) => {
let outlineName = "";
if (item.uid) {
if (item?.uid) {
outlineName = item?.uid?.replace(/\.+/g, "_");
}
const hasNested = hasNestedValue(item);
Expand Down