feat: added default product switch in project settings

This commit is contained in:
=
2025-07-02 01:16:51 +05:30
parent 0b2c967e63
commit 8bdf294a34
12 changed files with 56 additions and 24 deletions
@@ -168,11 +168,10 @@ export const Navbar = () => {
<p className="pl-2 pr-3 text-lg text-mineshaft-400/70">/</p>
<DropdownMenu modal={false}>
<Link to="/organization/projects">
<div className="flex cursor-pointer items-center gap-2 text-sm text-white">
<div className="flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary-400">
<div>
<FontAwesomeIcon icon={faCubes} className="pr-1 text-xs" />
</div>
<div className="max-w-32 overflow-hidden text-ellipsis">{currentOrg?.name}</div>
<div className="mr-2 rounded border border-mineshaft-500 px-1 text-xs text-bunker-300">
{getPlan(subscription)}
@@ -102,13 +102,13 @@ export const ProjectSelect = () => {
<DropdownMenu modal={false}>
<Link
to={getProjectHomePage(
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
getCurrentProductFromUrl(window.location.href) || currentWorkspace.defaultProduct
)}
params={{
projectId: currentWorkspace.id
}}
>
<div className="flex cursor-pointer items-center gap-2 text-sm text-white">
<div className="flex cursor-pointer items-center gap-2 text-sm text-white duration-100 hover:text-primary-400">
<div>
<FontAwesomeIcon icon={faCube} className="text-xs" />
</div>
@@ -156,7 +156,7 @@ export const ProjectSelect = () => {
// to reproduce change this back to router.push and switch between two projects with different env count
// look into this on dashboard revamp
const url = linkOptions({
to: getProjectHomePage(workspace.defaultType),
to: getProjectHomePage(workspace.defaultProduct),
params: {
projectId: workspace.id
}