Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update own user suggestions in teambuilder (#21340)
* feat: add special YouResult card for new chat results * feat: ensure you are always the most interesting person * chore: update stories with new searchresult field * chore: fix alphabetical ordering in story
- Loading branch information
1 parent
300b3b2
commit 266205f
Showing
8 changed files
with
100 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import * as React from 'react' | ||
import * as Kb from '../../common-adapters' | ||
import * as Styles from '../../styles' | ||
import * as Container from '../../util/container' | ||
import * as Chat2Gen from '../../actions/chat2-gen' | ||
import * as TeamBuildingGen from '../../actions/team-building-gen' | ||
import CommonResult, {ResultProps} from './common-result' | ||
|
||
const YouResult = React.memo((props: ResultProps) => { | ||
const dispatch = Container.useDispatch() | ||
const onSelfChat = () => { | ||
dispatch(TeamBuildingGen.createCancelTeamBuilding({namespace: 'chat2'})) | ||
dispatch(Chat2Gen.createPreviewConversation({participants: [props.username], reason: 'search'})) | ||
} | ||
return ( | ||
<CommonResult | ||
{...props} | ||
onAdd={onSelfChat} | ||
rowStyle={styles.rowContainer} | ||
bottomRow={<Kb.Text type="BodySmall">Write secure notes to yourself</Kb.Text>} | ||
/> | ||
) | ||
}) | ||
|
||
const styles = Styles.styleSheetCreate(() => ({ | ||
actionButton: Styles.platformStyles({ | ||
common: { | ||
marginLeft: Styles.globalMargins.tiny, | ||
}, | ||
isElectron: { | ||
height: Styles.globalMargins.small, | ||
width: Styles.globalMargins.small, | ||
}, | ||
isMobile: { | ||
height: Styles.globalMargins.large, | ||
marginRight: Styles.globalMargins.tiny, | ||
width: Styles.globalMargins.large, | ||
}, | ||
}), | ||
rowContainer: { | ||
...Styles.padding( | ||
Styles.globalMargins.tiny, | ||
Styles.globalMargins.medium, | ||
Styles.globalMargins.tiny, | ||
Styles.globalMargins.xsmall | ||
), | ||
}, | ||
})) | ||
|
||
export default YouResult |