added routing and navigation between the write and buy pages