mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
chore: deprecate baseSize state
This commit is contained in:
parent
252b0e7628
commit
9e0831d8ed
2 changed files with 2 additions and 8 deletions
|
|
@ -22,6 +22,7 @@ import * as keyHelper from 'utils/keyHelper'
|
|||
const RawGitako: React.FC<Props & ConnectorState> = function RawGitako(props) {
|
||||
const configContext = useConfigs()
|
||||
const accessToken = props.configContext.val.access_token
|
||||
const [baseSize] = React.useState(() => configContext.val.sideBarWidth)
|
||||
|
||||
const intelligentToggle = configContext.val.intelligentToggle
|
||||
React.useEffect(() => {
|
||||
|
|
@ -88,7 +89,6 @@ const RawGitako: React.FC<Props & ConnectorState> = function RawGitako(props) {
|
|||
errorDueToAuth,
|
||||
metaData,
|
||||
treeData: treeRoot,
|
||||
baseSize,
|
||||
error,
|
||||
shouldShow,
|
||||
showSettings,
|
||||
|
|
@ -132,7 +132,6 @@ const RawGitako: React.FC<Props & ConnectorState> = function RawGitako(props) {
|
|||
}
|
||||
|
||||
RawGitako.defaultProps = {
|
||||
baseSize: 260,
|
||||
shouldShow: false,
|
||||
showSettings: false,
|
||||
errorDueToAuth: false,
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ export type ConnectorState = {
|
|||
setShouldShow: GetCreatedMethod<typeof setShouldShow>
|
||||
toggleShowSideBar: GetCreatedMethod<typeof toggleShowSideBar>
|
||||
toggleShowSettings: GetCreatedMethod<typeof toggleShowSettings>
|
||||
} & {
|
||||
baseSize: number
|
||||
}
|
||||
|
||||
type BoundMethodCreator<Args extends any[] = []> = MethodCreator<Props, ConnectorState, Args>
|
||||
|
|
@ -62,10 +60,7 @@ export const init: BoundMethodCreator = dispatch => async () => {
|
|||
dispatch.call(setMetaData, metaData)
|
||||
|
||||
const [, { configContext }] = dispatch.get()
|
||||
const { sideBarWidth, access_token: accessToken, intelligentToggle } = configContext.val
|
||||
dispatch.set({
|
||||
baseSize: sideBarWidth,
|
||||
})
|
||||
const { access_token: accessToken } = configContext.val
|
||||
|
||||
if (!metaData.branchName || !metaData.userName || !metaData.repoName) return
|
||||
const getTreeDataAggressively = platform.getTreeData(
|
||||
|
|
|
|||
Loading…
Reference in a new issue