Moved add post from action to component.