twitter working

This commit is contained in:
talksik
2019-08-20 23:36:22 -07:00
parent dba17d6b7b
commit 8eba7be605
2 changed files with 21 additions and 5 deletions
+9 -5
View File
@@ -12,7 +12,6 @@ const AvailableCommandsIcons = props => {
<Tooltip title="default search on google">
<img className={styles.icon} src={envVars.DEFAULT_LOGO} />
</Tooltip>
{/* Gmail */}
<Tooltip title="gmail">
<img
@@ -20,7 +19,6 @@ const AvailableCommandsIcons = props => {
src={'https://image.flaticon.com/icons/png/512/281/281769.png'}
/>
</Tooltip>
{/* Reddit */}
<Tooltip title="red">
<img
@@ -30,7 +28,6 @@ const AvailableCommandsIcons = props => {
}
/>
</Tooltip>
{/* Youtube */}
<Tooltip title="utube">
<img
@@ -41,6 +38,15 @@ const AvailableCommandsIcons = props => {
/>
</Tooltip>
{/* Twitter */}
<Tooltip title="twit">
<img
className={styles.icon}
src={
'https://www.coopdgii.com/wp-content/uploads/2016/12/Icono_Twitter.png.png'
}
/>
</Tooltip>
{/* Slack */}
{/* <img
className={styles.icon}
@@ -48,7 +54,6 @@ const AvailableCommandsIcons = props => {
'https://a.slack-edge.com/4a5c4/marketing/img/meta/slack_hash_256.png'
}
/> */}
{/* Google Maps */}
{/* <img
className={styles.icon}
@@ -56,7 +61,6 @@ const AvailableCommandsIcons = props => {
'https://travelhoney.com/wp-content/uploads/2017/03/google-maps-for-ios-8-1.png'
}
/> */}
{/* Android Messages */}
{/* <img
className={styles.icon}
+12
View File
@@ -142,6 +142,16 @@ class MainCommand extends Component {
newInput = newInput.replace('red', '');
newCommandComplete = true;
newCommandInputPlaceholder = 'search for any subreddit';
} else if (
newInput.includes('twit') &&
newCommandIcon == envVars.DEFAULT_LOGO
) {
newCommand = 'twitter';
newCommandIcon =
'https://www.coopdgii.com/wp-content/uploads/2016/12/Icono_Twitter.png.png';
newInput = newInput.replace('twit', '');
newCommandComplete = true;
newCommandInputPlaceholder = "what's happening";
} else if (newCommand == 'google') {
newCommand = 'google';
newCommandComplete = true;
@@ -219,6 +229,8 @@ class MainCommand extends Component {
);
} else if (this.state.command == 'reddit') {
window.open('https://www.reddit.com/r/' + commandInput, '_blank');
} else if (this.state.command == 'twitter') {
window.open('https://twitter.com/search?q=' + commandInput, '_blank');
}
this.setState(INITIAL_COMMAND_STATE, () => {