1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-05 06:04:28 +07:00

Merge branch '4.x-master' into refactor/78_replace-node-sass-with-emotion

This commit is contained in:
Juan Picado @jotadeveloper 2019-07-09 13:52:25 +02:00 committed by GitHub
commit 6a421ab22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 10 deletions

View File

@ -85,7 +85,7 @@
"stylelint-webpack-plugin": "0.10.5",
"supertest": "4.0.2",
"typeface-roboto": "0.0.54",
"typescript": "3.4.5",
"typescript": "3.5.2",
"url-loader": "1.1.2",
"validator": "10.11.0",
"verdaccio": "4.0.3",

View File

@ -71,7 +71,6 @@ describe('App', () => {
await handleDoLogin('sam', '1234');
const result = {
username: 'sam',
token: 'TEST_TOKEN',
};
expect(wrapper.state('isUserLoggedIn')).toBeTruthy();
expect(wrapper.state('showLoginModal')).toBeFalsy();

View File

@ -81,7 +81,7 @@ export default class App extends Component<{}, AppStateInterface> {
this.handleLogout();
} else {
this.setState({
user: { username, token },
user: { username },
isUserLoggedIn: true,
});
}
@ -148,7 +148,6 @@ export default class App extends Component<{}, AppStateInterface> {
this.setState({
user: {
username,
token,
},
isUserLoggedIn: true, // close login modal after successful login
showLoginModal: false, // set isUserLoggedIn to true

View File

@ -7,8 +7,8 @@ export interface DetailPage {
}
export async function callDetailPage(packageName): Promise<DetailPage> {
const readMe = await API.request(`package/readme/${packageName}`, 'GET');
const packageMeta = await API.request(`sidebar/${packageName}`, 'GET');
const readMe = await API.request<string | {}>(`package/readme/${packageName}`, 'GET');
const packageMeta = await API.request<PackageMetaInterface | {}>(`sidebar/${packageName}`, 'GET');
return { readMe, packageMeta };
}

View File

@ -12812,10 +12812,10 @@ typeface-roboto@0.0.54:
resolved "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
typescript@3.4.5:
version "3.4.5"
resolved "https://registry.verdaccio.org/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
typescript@3.5.2:
version "3.5.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
ua-parser-js@^0.7.18:
version "0.7.19"