Skip to content

Commit e9b881b

Browse files
committed
Merge remote-tracking branch 'origin/4.x-master' into 89-fix-incorrect-logos-style
# Conflicts: # src/components/Login/__snapshots__/Login.test.tsx.snap
2 parents fdad635 + 50664dc commit e9b881b

21 files changed

+137
-568
lines changed

package.json

-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"localstorage-memory": "1.0.3",
6161
"mini-css-extract-plugin": "0.7.0",
6262
"node-mocks-http": "1.7.3",
63-
"node-sass": "4.12.0",
6463
"normalize.css": "8.0.1",
6564
"optimize-css-assets-webpack-plugin": "5.0.1",
6665
"ora": "3.4.0",
@@ -76,16 +75,13 @@
7675
"react-router-dom": "4.3.1",
7776
"resolve-url-loader": "3.0.1",
7877
"rimraf": "2.6.3",
79-
"sass-loader": "7.1.0",
8078
"source-map-loader": "0.2.4",
8179
"standard-version": "4.4.0",
8280
"style-loader": "0.23.1",
8381
"stylelint": "10.1.0",
8482
"stylelint-config-recommended": "2.2.0",
85-
"stylelint-config-recommended-scss": "3.3.0",
8683
"stylelint-config-styled-components": "0.1.1",
8784
"stylelint-processor-styled-components": "1.8.0",
88-
"stylelint-scss": "3.8.0",
8985
"stylelint-webpack-plugin": "0.10.5",
9086
"supertest": "4.0.2",
9187
"typeface-roboto": "0.0.54",

src/App/App.tsx

+5-11
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import Header from '../components/Header';
1010
import { Container, Content } from '../components/Layout';
1111
import RouterApp from '../router';
1212
import API from '../utils/api';
13-
import '../styles/typeface-roboto.scss';
14-
import '../styles/main.scss';
13+
import '../styles/typeface-roboto.css';
14+
import '../utils/styles/global';
1515
import 'normalize.css';
1616
import Footer from '../components/Footer';
1717
import { FormError } from 'src/components/Login/Login';
@@ -66,13 +66,7 @@ export default class App extends Component<{}, AppStateInterface> {
6666
return (
6767
// @ts-ignore
6868
<Container isLoading={isLoading}>
69-
{isLoading ? (
70-
<Loading />
71-
) : (
72-
<>
73-
<AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>
74-
</>
75-
)}
69+
{isLoading ? <Loading /> : <AppContextProvider value={context}>{this.renderContent()}</AppContextProvider>}
7670
{this.renderLoginModal()}
7771
</Container>
7872
);
@@ -138,7 +132,7 @@ export default class App extends Component<{}, AppStateInterface> {
138132
if (username && token) {
139133
storage.setItem('username', username);
140134
storage.setItem('token', token);
141-
this.setLoggedUser(username, token);
135+
this.setLoggedUser(username);
142136
}
143137

144138
if (error) {
@@ -149,7 +143,7 @@ export default class App extends Component<{}, AppStateInterface> {
149143
}
150144
};
151145

152-
public setLoggedUser = (username, token) => {
146+
public setLoggedUser = username => {
153147
this.setState({
154148
user: {
155149
username,

src/App/app.scss

-16
This file was deleted.

src/App/styles.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { css } from 'emotion';
2+
import colors from '../utils/styles/colors';
3+
4+
export const alertError = css`
5+
background-color: ${colors.red} !important;
6+
min-width: inherit !important;
7+
`;
8+
9+
export const alertErrorMsg = css`
10+
display: flex;
11+
align-items: center;
12+
`;
13+
14+
export const alertIcon = css({
15+
opacity: 0.9,
16+
marginRight: '8px',
17+
});

src/components/Login/Login.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import FormControl from '@material-ui/core/FormControl';
1212
import FormHelperText from '@material-ui/core/FormHelperText';
1313
import { css } from 'emotion';
1414

15-
// @ts-ignore
16-
import classes from './login.scss';
15+
import * as classes from './styles';
1716

1817
interface FormFields {
1918
required: boolean;

src/components/Login/login.scss

-22
This file was deleted.

src/components/Login/styles.ts

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { css } from 'emotion';
2+
import colors from '../../utils/styles/colors';
3+
4+
export const loginDialog = css({
5+
minWidth: '300px',
6+
});
7+
8+
export const loginError = css`
9+
background-color: ${colors.red} !important;
10+
min-width: inherit !important;
11+
margin-bottom: 10px !important;
12+
`;
13+
14+
export const loginErrorMsg = css`
15+
display: flex;
16+
align-items: center;
17+
`;
18+
19+
export const loginIcon = css({
20+
opacity: 0.9,
21+
marginRight: '8px',
22+
});

src/components/PackageList/PackageList.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import Help from '../Help';
77
import { formatLicense } from '../../utils/package';
88
import { PackageInterface } from '../Package/Package';
99

10-
// @ts-ignore
11-
import classes from './packageList.scss';
10+
import * as classes from './styles';
1211

1312
interface Props {
1413
packages: PackageInterface[];

src/components/PackageList/packageList.scss

-12
This file was deleted.

src/components/PackageList/styles.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { css } from 'emotion';
2+
import { fontWeight, fontSize } from '../../utils/styles/sizes';
3+
4+
export const listTitle = css({
5+
fontWeight: fontWeight.regular,
6+
fontSize: fontSize.xl,
7+
margin: `0 0 10px 0`,
8+
});
9+
10+
export const pkgContainer = css`
11+
margin: 0;
12+
padding: 0;
13+
14+
& .listTitle {
15+
${listTitle}
16+
}
17+
`;

src/pages/home/home.scss

-16
This file was deleted.

src/styles/core.scss

-22
This file was deleted.

src/styles/global.scss

-47
This file was deleted.

src/styles/main.scss

-2
This file was deleted.

src/styles/mixins.scss

-46
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)