Add post submit functionality with optimistic loading