My geom_curve function does not work

If I remember correctly ggplotly() is not pipe friendly, you have to pass p explicitly.

ggplotly(p)

If this doesn't help, please provide a reproducible example (reprex) illustrating your issue. Have a look at this resources, to see how to create one for a shiny app