diff --git a/webapp/src/App.tsx b/webapp/src/App.tsx index 790ba3e8a..88c83c2c9 100644 --- a/webapp/src/App.tsx +++ b/webapp/src/App.tsx @@ -99,4 +99,4 @@ const App = ({registry, store}:{registry: PluginRegistry, store: Store; }; -export default App; \ No newline at end of file +export default App; diff --git a/webapp/src/containers/Rhs/Rhs.container.tsx b/webapp/src/containers/Rhs/Rhs.container.tsx index 41d762038..0d4a79c53 100644 --- a/webapp/src/containers/Rhs/Rhs.container.tsx +++ b/webapp/src/containers/Rhs/Rhs.container.tsx @@ -1,4 +1,4 @@ -import React, {memo, useCallback, useMemo} from 'react'; +import React, {useCallback} from 'react'; import {Spinner} from '@brightscout/mattermost-ui-library'; diff --git a/webapp/src/hooks/usePluginApi.ts b/webapp/src/hooks/usePluginApi.ts index 770213d7d..127cac60c 100644 --- a/webapp/src/hooks/usePluginApi.ts +++ b/webapp/src/hooks/usePluginApi.ts @@ -7,7 +7,7 @@ import {ReduxState} from 'types/common/store.d'; import {setApiRequestCompletionState} from 'reducers/apiRequest'; import {msTeamsPluginApi} from 'services'; -function usePluginApi() { +function usePluginApi() { const state = useSelector((reduxState: ReduxState) => reduxState['plugins-com.mattermost.msteams-sync']); const dispatch = useDispatch(); diff --git a/webapp/src/index.tsx b/webapp/src/index.tsx index 3c7562246..8801fee06 100644 --- a/webapp/src/index.tsx +++ b/webapp/src/index.tsx @@ -5,7 +5,7 @@ import {GlobalState} from 'mattermost-redux/types/store'; import reducer from 'reducers'; -import EnforceConnectedModal from 'components/enforceConnectedAccountModal'; +import EnforceConnectedAccountModal from 'components/enforceConnectedAccountModal'; import MSTeamsAppManifestSetting from 'components/appManifestSetting'; import ListConnectedUsers from 'components/getConnectedUsersSetting'; @@ -27,7 +27,7 @@ export default class Plugin { )); // @see https://developers.mattermost.com/extend/plugins/webapp/reference/ - this.enforceConnectedAccountId = registry.registerRootComponent(EnforceConnectedModal); + this.enforceConnectedAccountId = registry.registerRootComponent(EnforceConnectedAccountModal); registry.registerAdminConsoleCustomSetting('appManifestDownload', MSTeamsAppManifestSetting); registry.registerAdminConsoleCustomSetting('ConnectedUsersReportDownload', ListConnectedUsers); diff --git a/webapp/src/selectors/index.tsx b/webapp/src/selectors/index.tsx index 9de536868..b7c208985 100644 --- a/webapp/src/selectors/index.tsx +++ b/webapp/src/selectors/index.tsx @@ -1,9 +1,9 @@ -import {ApiRequestCompletionState, ConnectedState, ReduxState, SnackbarState} from 'types/common/store.d'; +import {ApiRequestCompletionState, ConnectedState, PluginReduxState, SnackbarState} from 'types/common/store.d'; -export const getApiRequestCompletionState = (state: ReduxState['plugins-com.mattermost.msteams-sync']): ApiRequestCompletionState => state.apiRequestCompletionSlice; +export const getApiRequestCompletionState = (state: PluginReduxState): ApiRequestCompletionState => state.apiRequestCompletionSlice; -export const getConnectedState = (state: ReduxState['plugins-com.mattermost.msteams-sync']): ConnectedState => state.connectedStateSlice; +export const getConnectedState = (state: PluginReduxState): ConnectedState => state.connectedStateSlice; -export const getSnackbarState = (state: ReduxState['plugins-com.mattermost.msteams-sync']): SnackbarState => state.snackbarSlice; +export const getSnackbarState = (state: PluginReduxState): SnackbarState => state.snackbarSlice; -export const getIsRhsLoading = (state: ReduxState['plugins-com.mattermost.msteams-sync']): {isRhsLoading: boolean} => state.rhsLoadingSlice; +export const getIsRhsLoading = (state: PluginReduxState): {isRhsLoading: boolean} => state.rhsLoadingSlice; diff --git a/webapp/src/styles/_variables.scss b/webapp/src/styles/_variables.scss index 217e0c4f2..2a0374289 100644 --- a/webapp/src/styles/_variables.scss +++ b/webapp/src/styles/_variables.scss @@ -2,7 +2,7 @@ $display-styles: flex, none, block; // margins, paddings and gaps -$sizes: 0, 4, 6, 8, 10, 12, 16, 18, 24, 20, 30, 32, 40, auto; +$sizes: 0, 4, 6, 8, 10, 12, 16, 18, 24, 20, 30, 32, 40, 62, auto; // font weights $font-weights: 300, 400, 500, 600, 700, 800; diff --git a/webapp/src/types/common/store.d.ts b/webapp/src/types/common/store.d.ts index 8153132c1..aac4b75eb 100644 --- a/webapp/src/types/common/store.d.ts +++ b/webapp/src/types/common/store.d.ts @@ -7,10 +7,10 @@ import {DialogProps} from '@brightscout/mattermost-ui-library'; import {SnackbarColor} from 'components/Snackbar/Snackbar.types'; import {IconName} from 'components'; -type PluginState = RootState<{ [x: string]: QueryDefinition, never, void, 'msTeamsPluginApi'>; }, never, 'msTeamsPluginApi'> +type PluginReduxState = RootState<{ [x: string]: QueryDefinition, never, void, 'msTeamsPluginApi'>; }, never, 'msTeamsPluginApi'> interface ReduxState extends GlobalState { - 'plugins-com.mattermost.msteams-sync': PluginState + 'plugins-com.mattermost.msteams-sync': PluginReduxState } type ApiRequestCompletionState = { diff --git a/webapp/src/types/mattermost-webapp/index.d.ts b/webapp/src/types/mattermost-webapp/index.d.ts index 5be70b528..7ff95ef58 100644 --- a/webapp/src/types/mattermost-webapp/index.d.ts +++ b/webapp/src/types/mattermost-webapp/index.d.ts @@ -1,9 +1,8 @@ - interface PluginRegistry { registerPostTypeComponent(typeName: string, component: React.ElementType) registerRootComponent(component: React.ElementType) registerAdminConsoleCustomSetting(key: string, component: React.ElementType) - registerRightHandSidebarComponent(component:null | (React.ReactNode), title: string | JSX.Element) + registerRightHandSidebarComponent(component:null | (() => JSX.Element), title: string | JSX.Element) registerChannelHeaderButtonAction(icon: JSX.Element | null, action: () => void, dropdownText: string | null, tooltipText: string | null) registerAppBarComponent(iconUrl: string, action: () => void, tooltipText: string) registerReducer(reducer)