'use strict';
import {HOME_C as C} from '../constants/Constants';
import {dispatcher} from '../dispatcher/GlobalDispatcher';
import {Store} from './Store';

export const homeStore = new Store({
    message: '',
    getData: function(){
        return {
           message: this.message,
        };
    }
});

dispatcher.register(C.PAGE_LOADED, function(payload) {
    homeStore.message = payload.message;
    homeStore.change();
});