Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ui): simplify implementation of github provider using PAT #1963

Merged
merged 20 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions ee/tabby-ui/app/(dashboard)/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export default function Sidebar({ children, className }: SidebarProps) {
</>
}
>
<SidebarButton href="/settings/git">
Git Providers
<SidebarButton href="/settings/repository/git">
Repository Providers
</SidebarButton>
<SidebarButton href="/settings/sso">SSO</SidebarButton>
<SidebarButton href="/settings/mail">
Expand Down Expand Up @@ -135,9 +135,12 @@ const linkVariants = cva(
function SidebarButton({ href, children }: SidebarButtonProps) {
const pathname = usePathname()
const isSelected = React.useMemo(() => {
return href === '/'
? href === pathname
: shouldPathnameHighlight(pathname, href)
if (href === '/') return href === pathname
if (href.startsWith('/settings/repository/github')) {
return pathname.startsWith('/settings/repository/')
}

return shouldPathnameHighlight(pathname, href)
}, [pathname, href])

const state = isSelected ? 'selected' : 'not-selected'
Expand Down

This file was deleted.

11 changes: 0 additions & 11 deletions ee/tabby-ui/app/(dashboard)/settings/(integrations)/git/page.tsx

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading