diff --git a/packages/shared/src/components/opportunity/SideBySideEdit/OpportunityEditPanel.tsx b/packages/shared/src/components/opportunity/SideBySideEdit/OpportunityEditPanel.tsx index 6db897e15a..ce12db0422 100644 --- a/packages/shared/src/components/opportunity/SideBySideEdit/OpportunityEditPanel.tsx +++ b/packages/shared/src/components/opportunity/SideBySideEdit/OpportunityEditPanel.tsx @@ -9,6 +9,8 @@ import { import { ArrowIcon } from '../../icons'; import { IconSize } from '../../Icon'; import type { Opportunity } from '../../../features/opportunity/types'; +import { settingsUrl, webappUrl } from '../../../lib/constants'; +import { getPathnameWithQuery } from '../../../lib/links'; import { RoleInfoSection } from './sections/RoleInfoSection'; import { JobDetailsSection } from './sections/JobDetailsSection'; import { ContentSection } from './sections/ContentSection'; @@ -192,7 +194,13 @@ export function OpportunityEditPanel({ name={recruiter?.name} image={recruiter?.image} subtitle={recruiter?.title} - editUrl="/settings/profile" + editUrl={getPathnameWithQuery( + `${settingsUrl}/profile`, + new URLSearchParams({ + redirectTo: `${webappUrl}recruiter/${opportunity.id}/edit`, + redirectCopy: 'Back to job posting', + }), + )} emptyMessage="No recruiter info added yet" /> diff --git a/packages/shared/src/components/recruiter/layout/Sidebar.tsx b/packages/shared/src/components/recruiter/layout/Sidebar.tsx index baf083275a..f71cd0e353 100644 --- a/packages/shared/src/components/recruiter/layout/Sidebar.tsx +++ b/packages/shared/src/components/recruiter/layout/Sidebar.tsx @@ -16,6 +16,7 @@ import { getOpportunitiesOptions } from '../../../features/opportunity/queries'; import type { Opportunity } from '../../../features/opportunity/types'; import { OpportunityState } from '../../../features/opportunity/protobuf/opportunity'; import { settingsUrl, webappUrl } from '../../../lib/constants'; +import { getPathnameWithQuery } from '../../../lib/links'; import { LogoutReason } from '../../../lib/user'; const Header = () => ( @@ -75,7 +76,13 @@ const Footer = () => { variant={ButtonVariant.Tertiary} icon={} size={ButtonSize.XSmall} - href={`${settingsUrl}/profile`} + href={getPathnameWithQuery( + `${settingsUrl}/profile`, + new URLSearchParams({ + redirectTo: `${webappUrl}recruiter`, + redirectCopy: 'Back to recruiter dashboard', + }), + )} tag="a" /> + )}
{isMobile ? (