Skip to content

Commit f40676a

Browse files
committed
use object spreading
1 parent 2cdb5b8 commit f40676a

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

src/app/core/toast/toast.component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,10 @@ export class ToastComponent implements OnInit {
2929
}
3030

3131
private applyStyle(toast): Toast {
32-
// return {
33-
// ...toast,
34-
// styles: [styles.toastBase, styles[toast.level]],
35-
// };
36-
return Object.assign({}, toast, {
32+
return {
33+
...toast,
3734
styles: [styles.toastBase, styles[toast.level]],
38-
});
35+
};
3936
}
4037

4138
private addToast(toast) {

src/app/pages/+related-user-list/related-user-list.component.styles.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import {StyleSheet} from "aphrodite";
22
import {list_1} from "../../styles/shared.styles";
33

44
export const styles = StyleSheet.create({
5-
// list: {...list_1},
6-
list: Object.assign({}, list_1),
5+
list: {...list_1},
76
gravatar: {
87
float: 'left',
98
marginRight: '8px',

src/app/pages/+user-list/user-list.component.styles.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import {StyleSheet} from "aphrodite";
22
import {list_1} from "../../styles/shared.styles";
33

44
export const styles = StyleSheet.create({
5-
// list: {...list_1},
6-
list: Object.assign({}, list_1),
5+
list: {...list_1},
76
gravatar: {
87
float: 'left',
98
marginRight: '8px',

src/app/pages/home/feed/feed.component.styles.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import {list_1} from "../../../styles/shared.styles";
33
import {colors} from "../../../styles/colors.styles";
44

55
export const styles = StyleSheet.create({
6-
// list: {
7-
// ...list_1,
8-
// lineHeight: '20px',
9-
// },
10-
list: Object.assign({}, list_1, {
6+
list: {
7+
...list_1,
118
lineHeight: '20px',
12-
}),
9+
},
1310
gravatar: {
1411
float: 'left',
1512
marginRight: '8px',

0 commit comments

Comments
 (0)