import router from "@/router";

export async function toName(name: string) {
    await router.isReady()
    const map: Record<string, string> = {
      'Personal info': 'account-settings-personal',
      'Profile questions': 'account-settings-questions',
      'Get support': 'account-help-support',
      'Contact us': 'account-help-contact',
      'Terms & conditions': 'account-legal-terms',
      'Privacy policy': 'account-legal-privacy',
    }
  
    const routeName = map[name]
    if (routeName) {
      console.log('你倒是跳转啊',routeName)
      return router.push({ name: routeName })
    }
}
  