Changeset View
Changeset View
Standalone View
Standalone View
lib/hooks/promote-sidebar.react.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { | import { | ||||
changeThreadSettingsActionTypes, | changeThreadSettingsActionTypes, | ||||
changeThreadSettings, | changeThreadSettings, | ||||
} from '../actions/thread-actions.js'; | } from '../actions/thread-actions.js'; | ||||
import { createLoadingStatusSelector } from '../selectors/loading-selectors.js'; | import { createLoadingStatusSelector } from '../selectors/loading-selectors.js'; | ||||
import { threadInfoSelector } from '../selectors/thread-selectors.js'; | import { threadInfoSelector } from '../selectors/thread-selectors.js'; | ||||
import { | import { | ||||
threadHasPermission, | threadHasPermission, | ||||
threadIsSidebar, | threadIsSidebar, | ||||
} from '../shared/thread-utils.js'; | } from '../shared/thread-utils.js'; | ||||
import type { LoadingStatus } from '../types/loading-types.js'; | import type { LoadingStatus } from '../types/loading-types.js'; | ||||
import { | import { threadPermissions } from '../types/thread-permission-types.js'; | ||||
threadTypes, | import { threadTypes } from '../types/thread-types-enum.js'; | ||||
type ThreadInfo, | import { type ThreadInfo } from '../types/thread-types.js'; | ||||
threadPermissions, | |||||
} from '../types/thread-types.js'; | |||||
import { | import { | ||||
useServerCall, | useServerCall, | ||||
useDispatchActionPromise, | useDispatchActionPromise, | ||||
} from '../utils/action-utils.js'; | } from '../utils/action-utils.js'; | ||||
import { useSelector } from '../utils/redux-utils.js'; | import { useSelector } from '../utils/redux-utils.js'; | ||||
function canPromoteSidebar( | function canPromoteSidebar( | ||||
sidebarThreadInfo: ThreadInfo, | sidebarThreadInfo: ThreadInfo, | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |