* fix: multi lines and spaces issues * fix: eslint operator-linebreak issue * fix: eslint quotes issue * fix: remaining quotes issues * fix: eslint object curly newline issue * fix: eslint object curly spacing issue * fix: eslint brace-style issues * fix: react jsx indent and props issues * fix: eslint trailing spaces issues * fix: eslint linbreak style issue * fix: eslint space unary operator issue * fix: eslint line around directives issue * fix: void and typeof space unary ops issue
37 lines
1.2 KiB
JavaScript
37 lines
1.2 KiB
JavaScript
/* eslint-disable no-new */
|
|
import {ReactRenderer} from 'ReactRenderer';
|
|
import {StudentAccountDeletion} from './components/StudentAccountDeletion';
|
|
|
|
const maxWait = 60000;
|
|
const interval = 50;
|
|
const accountDeletionWrapperId = 'account-deletion-container';
|
|
let currentWait = 0;
|
|
|
|
const wrapperRendered = setInterval(() => {
|
|
const wrapper = document.getElementById(accountDeletionWrapperId);
|
|
|
|
if (wrapper) {
|
|
clearInterval(wrapperRendered);
|
|
new ReactRenderer({
|
|
component: StudentAccountDeletion,
|
|
selector: `#${accountDeletionWrapperId}`,
|
|
componentName: 'StudentAccountDeletion',
|
|
props: {
|
|
socialAccountLinks: window.auth,
|
|
isActive: window.isActive,
|
|
additionalSiteSpecificDeletionText: window.additionalSiteSpecificDeletionText,
|
|
mktgRootLink: window.mktgRootLink,
|
|
platformName: window.platformName,
|
|
siteName: window.siteName,
|
|
mktgEmailOptIn: window.mktgEmailOptIn
|
|
},
|
|
});
|
|
}
|
|
|
|
currentWait += interval;
|
|
|
|
if (currentWait >= maxWait) {
|
|
clearInterval(wrapperRendered);
|
|
}
|
|
}, interval);
|