Skip to content

Commit fbfe95d

Browse files
Merge pull request #519 from contentstack/feature/content-mapper
Feature/content mapper
2 parents eaeeb71 + ce32b7a commit fbfe95d

File tree

8 files changed

+102
-107
lines changed

8 files changed

+102
-107
lines changed

ui/src/components/AccountPage/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const AccountPage = (props: AccountObj): JSX.Element => {
1414
const { heading, copyrightText } = props.data;
1515

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

1918
return (
2019
// eslint-disable-next-line react/no-unknown-property
@@ -27,7 +26,7 @@ const AccountPage = (props: AccountObj): JSX.Element => {
2726
</div>
2827
<div className="AccountPage__action">
2928
<div className="AccountPage__content">{props?.children}</div>
30-
<p className="copyright_text">{${previousYear}-${currentYear} ${copyrightText}`}</p>
29+
<p className="copyright_text">{${currentYear} ${copyrightText}`}</p>
3130
</div>
3231
</div>
3332
);

ui/src/components/ContentMapper/contentMapper.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export interface ModifiedField {
191191
at: number;
192192
checked: boolean;
193193
id: string;
194-
otherCmsType: string;
194+
backupFieldType: string;
195195
parentId: string;
196196
uid: string;
197197
}

ui/src/components/ContentMapper/index.tsx

Lines changed: 79 additions & 79 deletions
Large diffs are not rendered by default.

ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -429,22 +429,9 @@ const LoadUploadFile = (props: LoadUploadFileProps) => {
429429
<div className="col-12">
430430
<div className={containerClassName}>
431431
{!isConfigLoading && !isEmptyString(fileDetails?.localPath) ? (
432-
<div className='file-icon-group'>
432+
// <div className='file-icon-group'>
433433
<FileComponent fileDetails={fileDetails || {}} />
434-
{/* {(showMessage && !isCancelLoading) &&
435-
(<Tooltip content='cancel validation' position='top'>
436-
<Icon icon='CloseNoborder' version='v2' onClick={handleCancelValidation}/>
437-
438-
</Tooltip> )
439-
} */}
440-
{/* { isCancelLoading &&
441-
<div style={{justifyContent:'center', alignItems:'center', marginTop:'7px'}}>
442-
<AsyncLoader color='$color-brand-primary-base'/>
443-
</div>
444-
} */}
445-
</div>
446-
447-
434+
// </div>
448435
) :
449436

450437
<div className='loader'>

ui/src/components/LegacyCms/legacyCms.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@
7474
margin-left: 10px !important;
7575
border: 1px solid $color-brand-secondary-lightest;
7676
border-radius: var(--TermCount, 5px);
77-
78-
}
79-
.validation-container > * {
80-
margin-right: 10px;
81-
margin-left: 15px;
77+
padding: 10px 15px;
8278
}
79+
// .validation-container > * {
80+
// margin-right: 10px;
81+
// margin-left: 15px;
82+
// }
8383
.error-container{
8484
display: flex;
8585
background-color: $color-base-white-5;

ui/src/context/app/app.provider.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ const AppContextProvider: FC<IProps> = ({ children }) => {
116116

117117
useEffect(() => {
118118
const token = getDataFromLocalStorage('app_token');
119-
setAuthToken(token || '');
119+
if (token) {
120+
setAuthToken(token ?? '');
121+
}
120122

121123
const storedNewMigration = sessionStorage.getItem('newMigration');
122124
if (storedNewMigration) {
@@ -129,6 +131,13 @@ const AppContextProvider: FC<IProps> = ({ children }) => {
129131
if (!isEmptyString(authToken)) {
130132
getUserDetails();
131133
}
134+
135+
// Debug token issue for hosting
136+
const token = getDataFromLocalStorage('app_token');
137+
if (token) {
138+
setAuthToken(token ?? '');
139+
}
140+
132141
}, [authToken]);
133142

134143
useEffect(() => {

upload-api/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
12
PORT=4002
2-
NODE_BACKEND_API=http://localhost:5001
3+
NODE_BACKEND_API =http://localhost:5001

upload-api/src/config/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
plan: {
33
dropdown: { optionLimit: 100 }
44
},
5-
cmsType: 'Sitecore',
5+
cmsType: 'contentful',
66
isLocalPath: true,
77
awsData: {
88
awsRegion: 'us-east-2',
@@ -12,7 +12,6 @@ export default {
1212
bucketName: 'migartion-test',
1313
buketKey: 'project/package 45.zip'
1414
},
15-
// localPath: '/Users/shobhit.upadhyay/Downloads/contentful-data.json' //package 45.zip'
16-
localPath: '/Users/shobhit.upadhyay/Downloads/package 47.zip'
15+
localPath: '/Users/sayali.joshi/Downloads/contentfulDummyEmbedData.json' //package 45.zip'
1716
// localPath: '/Users/umesh.more/Documents/ui-migration/migration-v2-node-server/upload-api/extracted_files/package 45.zip'
1817
};

0 commit comments

Comments
 (0)