refactor share button render to be one function, eliminate duplicate code