mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Update to shlink-web-component 0.1.1
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'chart.js/auto'; // TODO Import specific ones to reduce bundle size https://react-chartjs-2.js.org/docs/migration-to-v4/#tree-shaking
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { Provider } from 'react-redux';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
@@ -6,14 +5,10 @@ import pack from '../package.json';
|
||||
import { container } from './container';
|
||||
import { setUpStore } from './container/store';
|
||||
import { register as registerServiceWorker } from './serviceWorkerRegistration';
|
||||
import { fixLeafletIcons } from './utils/helpers/leaflet';
|
||||
import './index.scss';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import 'react-datepicker/dist/react-datepicker.css';
|
||||
|
||||
// This overwrites icons used for leaflet maps, fixing some issues caused by webpack while processing the CSS
|
||||
fixLeafletIcons();
|
||||
|
||||
const store = setUpStore(container);
|
||||
const { App, ScrollToTop, ErrorHandler, appUpdateAvailable } = container;
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import L from 'leaflet';
|
||||
import marker from 'leaflet/dist/images/marker-icon.png';
|
||||
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
|
||||
import markerShadow from 'leaflet/dist/images/marker-shadow.png';
|
||||
|
||||
export const fixLeafletIcons = () => {
|
||||
delete (L.Icon.Default.prototype as any)._getIconUrl; // eslint-disable-line no-underscore-dangle
|
||||
|
||||
L.Icon.Default.mergeOptions({
|
||||
iconRetinaUrl: marker2x,
|
||||
iconUrl: marker,
|
||||
shadowUrl: markerShadow,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user