Refactor on enter submit in share form component

Description

Describe the issue


Steps to reproduce

  1. in points

Actual behavior

Expected behavior