Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Dec 27, 2023
1 parent 46072f9 commit 7fb5da1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ import { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/c
import { __ } from '@wordpress/i18n';
import { useMergeRefs } from '@wordpress/compose';
// Needs to explicitly imported to be added dynamically
import AIImg from '../../static/images/sitegen/ai_bg.png';
import aiBg from '../../static/images/sitegen/ai_bg.png';
import { ThemeContext } from '../ThemeContextProvider';
import { THEME_DARK } from '../../../constants';

function useHTMLClass( className, isDarkMode ) {
useEffect( () => {
const lightBg = '#ededed';
// eslint-disable-next-line no-undef
const mainImage = new Image();
mainImage.src = AIImg;
mainImage.src = aiBg;
mainImage.onload = () => {
document.querySelector(
if( document.querySelector(

Check failure on line 29 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `(·document.querySelector(⏎↹↹↹↹'.nfd-onboarding-skeleton--sitegen'` with `·(⏎↹↹↹↹document.querySelector(·'.nfd-onboarding-skeleton--sitegen'·)`
'.nfd-onboarding-skeleton--sitegen'
).style.background = isDarkMode ? `url('${ AIImg }')` : '#ededed';
) ){

Check failure on line 31 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Delete `)`
document.querySelector(
'.nfd-onboarding-skeleton--sitegen'

Check failure on line 33 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Insert `↹`
).style.background = isDarkMode ? `url('${ aiBg }')` : lightBg;
}
};

const element =
Expand Down

0 comments on commit 7fb5da1

Please sign in to comment.