github
1381 of 2780 branches covered (49.68%)
0 of 440 new or added lines in 15 files covered. (0.0%)
13875 of 77148 relevant lines covered (17.98%)
1.8 hits per line
NEW
|
import { Key, Link } from '@teable/icons'; |
|
NEW
|
import { Badge } from '@teable/ui-lib/shadcn'; |
× |
NEW
|
import { useTranslation } from 'next-i18next'; |
× |
NEW
|
import { useMemo } from 'react'; |
× |
NEW
|
|
× |
NEW
|
export const useSettingRoute = () => { |
× |
NEW
|
const { t } = useTranslation(['setting', 'common']); |
× |
NEW
|
|
× |
NEW
|
return useMemo(() => {
|
× |
NEW
|
return [
|
× |
NEW
|
{ |
× |
NEW
|
Icon: Key,
|
× |
NEW
|
label: t('personalAccessToken'), |
× |
NEW
|
route: '/setting/personal-access-token', |
× |
NEW
|
pathTo: '/setting/personal-access-token', |
× |
NEW
|
}, |
× |
NEW
|
{ |
× |
NEW
|
Icon: Link,
|
× |
NEW
|
label: ( |
× |
NEW
|
<> |
× |
NEW
|
{t('oauthApps')} |
× |
NEW
|
<Badge |
× |
NEW
|
variant={'outline'} |
× |
NEW
|
className="ml-1 h-5 -translate-y-1 p-0.5 text-[11px] font-normal"
|
× |
NEW
|
> |
× |
NEW
|
{t('common:noun.beta')} |
× |
NEW
|
</Badge> |
× |
NEW
|
</> |
× |
NEW
|
), |
× |
NEW
|
route: '/setting/oauth-app', |
× |
NEW
|
pathTo: '/setting/oauth-app', |
× |
NEW
|
}, |
× |
NEW
|
]; |
× |
NEW
|
}, [t]); |
× |
NEW
|
}; |
× |