Skip to content

Commit 6fb0ecb

Browse files
committed
[FIX] awesome_dashboard: task 5
1 parent b8b00f2 commit 6fb0ecb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

awesome_dashboard/static/src/dashboard.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ class AwesomeDashboard extends Component {
1111

1212
setup() {
1313
this.action = useService("action");
14-
this.statistics = useState(useService("awesome_dashboard.statistics"));
14+
this.statsService = useService("awesome_dashboard.statistics");
15+
16+
onWillStart(async () => {
17+
this.statistics = await this.statsService.loadStatistics();
18+
});
19+
console.log(this.statistics);
1520
}
1621

1722
openCustomers() {

0 commit comments

Comments
 (0)