1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-28 00:44:30 +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", "stylelint-webpack-plugin": "0.10.5",
"supertest": "4.0.2", "supertest": "4.0.2",
"typeface-roboto": "0.0.54", "typeface-roboto": "0.0.54",
"typescript": "3.4.5", "typescript": "3.5.2",
"url-loader": "1.1.2", "url-loader": "1.1.2",
"validator": "10.11.0", "validator": "10.11.0",
"verdaccio": "4.0.3", "verdaccio": "4.0.3",

View File

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

View File

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

View File

@ -7,8 +7,8 @@ export interface DetailPage {
} }
export async function callDetailPage(packageName): Promise<DetailPage> { export async function callDetailPage(packageName): Promise<DetailPage> {
const readMe = await API.request(`package/readme/${packageName}`, 'GET'); const readMe = await API.request<string | {}>(`package/readme/${packageName}`, 'GET');
const packageMeta = await API.request(`sidebar/${packageName}`, 'GET'); const packageMeta = await API.request<PackageMetaInterface | {}>(`sidebar/${packageName}`, 'GET');
return { readMe, packageMeta }; 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" resolved "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.54.tgz#8f02c9a18d1cfa7f49381a6ff0d21ff061f38ad2"
integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ== integrity sha512-sOFA1FXgP0gOgBYlS6irwq6hHYA370KE3dPlgYEJHL3PJd5X8gQE0RmL79ONif6fL5JZuGDj+rtOrFeOqz5IZQ==
typescript@3.4.5: typescript@3.5.2:
version "3.4.5" version "3.5.2"
resolved "https://registry.verdaccio.org/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" resolved "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
ua-parser-js@^0.7.18: ua-parser-js@^0.7.18:
version "0.7.19" version "0.7.19"