Skip to content

Commit 1f251cc

Browse files
webpack fix and warning fixes
1 parent c83f2af commit 1f251cc

File tree

4 files changed

+9
-24
lines changed

4 files changed

+9
-24
lines changed

public/app/core/reducers/fn-slice.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ export const fnStateProps: FnStateProp[] = [
4141
'version',
4242
];
4343

44-
export const fnPropsMappedFromState: readonly FnPropMappedFromState[] = [
45-
'FNDashboard',
46-
'hiddenVariables',
47-
'mode',
48-
'uid',
49-
'queryParams',
50-
'slug',
51-
'version',
52-
] as const;
53-
5444
const INITIAL_MODE = GrafanaThemeType.Light;
5545

5646
export const FN_STATE_KEY = 'fnGlobalState';

public/app/fn-app/fn-dashboard-page/fn-dashboard.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { pick } from 'lodash';
21
import { FC, useMemo } from 'react';
32

4-
import { FnPropMappedFromState, fnPropsMappedFromState } from 'app/core/reducers/fn-slice';
5-
import { StoreState, useSelector } from 'app/types';
3+
import { FnGlobalState, FnPropMappedFromState } from 'app/core/reducers/fn-slice';
4+
import { useSelector } from 'app/types';
65

76
import { FnAppProvider } from '../fn-app-provider';
87
import { FNDashboardProps } from '../types';
@@ -20,12 +19,8 @@ export const FNDashboard: FC<FNDashboardComponentProps> = (props) => {
2019
);
2120
};
2221

23-
function mapStateToProps() {
24-
return ({ fnGlobalState }: StoreState) => pick(fnGlobalState, ...fnPropsMappedFromState);
25-
}
26-
2722
export const DashboardPortal: FC<FNDashboardComponentProps> = (p) => {
28-
const globalFnProps = useSelector(mapStateToProps());
23+
const globalFnProps = useSelector<FnGlobalState>(({ fnGlobalState }) => fnGlobalState);
2924

3025
const props = useMemo(
3126
() => ({

public/microfrontends/fn_dashboard/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<script nonce="" src="../../../public/build/runtime~fn_dashboard.27b2008e9aab8f8985b3.js" type="text/javascript"></script>
2121

22-
<script nonce="" src="../../../public/build/fn_dashboard.1f9b5b453196a7012a75.js" type="text/javascript"></script>
22+
<script nonce="" src="../../../public/build/fn_dashboard.3df600ee86003d356e2c.js" type="text/javascript"></script>
2323

2424
</body>
2525
</html>

scripts/webpack/webpack.dev.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const path = require('path');
1212
const { DefinePlugin, EnvironmentPlugin } = require('webpack');
1313
const WebpackAssetsManifest = require('webpack-assets-manifest');
1414
const { merge } = require('webpack-merge');
15-
const WebpackBar = require('webpackbar');
15+
// const WebpackBar = require('webpackbar');
1616

1717
const getEnvConfig = require('./env-util.js');
1818
const HTMLWebpackCSSChunks = require('./plugins/HTMLWebpackCSSChunks');
@@ -131,10 +131,10 @@ module.exports = (env = {}) => {
131131
integrity: true,
132132
publicPath: true,
133133
}),
134-
new WebpackBar({
135-
color: '#eb7b18',
136-
name: 'Grafana',
137-
}),
134+
// new WebpackBar({
135+
// color: '#eb7b18',
136+
// name: 'Grafana',
137+
// }),
138138
new EnvironmentPlugin(envConfig),
139139
new DefinePlugin({
140140
'process.env': {

0 commit comments

Comments
 (0)