Skip to content

Commit

Permalink
fix: fixed chuhunkload error during div integration due to lazy imports
Browse files Browse the repository at this point in the history
  • Loading branch information
syam babu committed Jan 9, 2025
1 parent f2e0678 commit 7806d1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import { WidgetContextProvider } from './context/WidgetContext';
import { getColors } from 'theme-colors';
import './App.css';
import { dynamicCssColorInjector, dynamicFontInjector } from './utils/dynamicStylePropertyInjector';
import { lazy, Suspense, useEffect, useState } from 'react';
import { Suspense, useEffect, useState } from 'react';
import dayjs from 'dayjs';
import Loader from './components/loader/Loader';
import Footer from './components/footer/Footer';
import ResultPanel from './components/panel/Panel';
import Search from './components/search/Search';

const Footer = lazy(() => import('./components/footer/Footer'));
const ResultPanel = lazy(() => import('./components/panel/Panel'));
const Search = lazy(() => import('./components/search/Search'));

import('dayjs/locale/en');
import('dayjs/locale/fr');
require('dayjs/locale/en');
require('dayjs/locale/fr');

function App(props) {
const { color, font, ...widgetProps } = props;
Expand Down
3 changes: 1 addition & 2 deletions src/components/card/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import './card.css';
import useRedirection from '../../utils/hooks/useRedirection';
import { urlTypes } from '../../constants/generalConstants';
import Loader from '../loader/Loader';

const EventDetailsModal = React.lazy(() => import('../Modal/EventDetailsModal'));
import EventDetailsModal from '../Modal/EventDetailsModal';

const Card = ({
id,
Expand Down

0 comments on commit 7806d1e

Please sign in to comment.