Skip to content

Commit 174809b

Browse files
committed
2 parents a4542b2 + e2d64a8 commit 174809b

File tree

6 files changed

+38
-29
lines changed

6 files changed

+38
-29
lines changed

src/app/components/Diff.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Diff({ snapshot, show }) {
2424
if (show) formatters.html.showUnchanged();
2525
else formatters.html.hideUnchanged();
2626

27-
if (previous === undefined) return <div> states are equal </div>;
27+
if (previous === undefined || delta === undefined) return <div> states are equal </div>;
2828
return (
2929
<div>
3030
{ ReactHtmlParser(html) }

src/app/components/SwitchApp.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const SwitchAppDropdown = () => {
2020

2121
return (
2222
<Select
23-
className="react-select-container"
24-
classNamePrefix="react-select"
23+
className="tab-select-container"
24+
classNamePrefix="tab-select"
2525
value={currTab}
2626
onChange={e => {
2727
dispatch(setTab(parseInt(e.value, 10)));

src/app/containers/HeadContainer.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import React from 'react';
22
import SwitchAppDropdown from '../components/SwitchApp';
3-
import { useStoreContext } from '../store';
4-
53

64
function HeadContainer() {
7-
const [store] = useStoreContext();
8-
const { tabs, currentTab } = store;
9-
const { title } = tabs[currentTab];
105
return (
116
<div className="head-container">
127
<SwitchAppDropdown />
13-
<div>
14-
{title}
15-
</div>
168
</div>
179
);
1810
}

src/app/containers/MainContainer.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ function MainContainer() {
3737
setnpm(true);
3838
break;
3939
}
40-
case 'activatedTab': {
41-
// console.log(payload, 'activatedTab in main Container');
42-
break;
43-
}
4440
default:
4541
}
4642
});

src/app/styles/layout/_headContainer.scss

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,39 @@
55

66
.head-container {
77
display: flex;
8-
flex-direction: row;
8+
flex-direction: row-reverse;
99
align-items: center;
10-
justify-content: space-around;
11-
}
10+
justify-content: space-between;
11+
}
12+
13+
.tab-select-container {
14+
font-size: 12px;
15+
min-width: 90px;
16+
margin: 7px;
17+
}
18+
19+
.tab-select-container {
20+
.tab-select__control,
21+
.tab-select__menu {
22+
border-style: none;
23+
width: 300px;
24+
background-color: $light-grey-one;
25+
z-index: 2;
26+
@extend %disable-highlight;
27+
}
28+
.tab-select__single-value {
29+
color: white;
30+
}
31+
.tab-select__option:hover {
32+
background-color: #2683ff;
33+
}
34+
.tab-select__option--is-selected,
35+
.tab-select__option--is-focused {
36+
background-color: transparent;
37+
}
38+
39+
// removes the cursor from blinking
40+
.css-w8afj7-Input {
41+
color: transparent;
42+
}
43+
}

src/extension/background.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,6 @@ chrome.runtime.onMessage.addListener((request, sender) => {
120120
}
121121
});
122122

123-
// chrome.tabs.onActivated.addListener((info) => {
124-
// console.log('this is activated', info);
125-
// if (bg) {
126-
// console.log('hello', bg);
127-
// bg.postMessage({
128-
// action: 'activatedTab',
129-
// payload: info.tabId,
130-
// });
131-
// }
132-
// });
133-
134123
// when tab is closed, remove the tabid from the tabsObj
135124
chrome.tabs.onRemoved.addListener(tabId => {
136125
delete tabsObj[tabId];

0 commit comments

Comments
 (0)