drawer: moved redirect function definition outside openMarketplace