fix bugs to generate menu items
add routes to preview