[MM-MM-52695] webapp/channels : Change plain import of PropsFromRedux to "import type" for certain files (#23337)
A while ago, we introduced the PropsFromRedux pattern, which was mostly used in class-based components or functional components if hooks were not used for selectors and dispatch. However, we discussed that it is recommended to import the type PropsFromRedux back to the component file from its index file with the type to avoid any cyclic import bugs.
`import type {PropsFromRedux} from './index'; `
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f815c20fca
Коммит
5c28071fb3
@@ -29,7 +29,7 @@ import InfoToast from 'components/info_toast/info_toast';
|
||||
|
||||
import RestorePostModal from '../restore_post_modal';
|
||||
|
||||
import {PropsFromRedux} from '.';
|
||||
import type {PropsFromRedux} from './index';
|
||||
|
||||
const DATE_RANGES = [
|
||||
RelativeRanges.TODAY_TITLE_CASE,
|
||||
|
||||
@@ -11,7 +11,7 @@ import LoadingScreen from 'components/loading_screen';
|
||||
|
||||
import EditedPostItem from './edited_post_item';
|
||||
|
||||
import {PropsFromRedux} from '.';
|
||||
import type {PropsFromRedux} from './index';
|
||||
|
||||
const renderView = (props: Record<string, unknown>): JSX.Element => (
|
||||
<div
|
||||
|
||||
@@ -15,7 +15,7 @@ import {getCurrentMomentForTimezone} from 'utils/timezone';
|
||||
|
||||
import Constants from 'utils/constants';
|
||||
|
||||
import {PropsFromRedux} from './index';
|
||||
import type {PropsFromRedux} from './index';
|
||||
|
||||
import './post_reminder_custom_time_picker_modal.scss';
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user