refactor repo input logic into a component