Skip to content

Commit bd7518e

Browse files
Merge pull request #1062 from topcoder-platform/PM-876
PM-876 Add a requests button on opportunity feed
2 parents 31d15a0 + 3e088f6 commit bd7518e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,16 @@ const CopilotOpportunityList: FC<{}> = () => {
134134
onClick: () => navigate(copilotRoutesMap.CopilotRequestForm),
135135
}
136136

137+
const addCopilotRequestsButton: ButtonProps = {
138+
label: 'Copilot Requests',
139+
onClick: () => navigate(copilotRoutesMap.CopilotRequests),
140+
}
141+
137142
return (
138143
<ContentLayout
139144
title='Copilot Opportunities'
140145
buttonConfig={isAdminOrPM ? addNewRequestButton : undefined}
146+
secondaryButtonConfig={isAdminOrPM ? addCopilotRequestsButton : undefined}
141147
>
142148
<PageTitle>Copilot Opportunities</PageTitle>
143149
<Table

src/libs/ui/lib/components/content-layout/ContentLayout.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
border-bottom: $border solid $black-5;
3030
margin-top: $sp-2;
3131
padding: $sp-6 0;
32+
gap: $sp-6;
3233

3334
h1 {
3435
flex: 1;

src/libs/ui/lib/components/content-layout/ContentLayout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import styles from './ContentLayout.module.scss'
77

88
export interface ContentLayoutProps {
99
buttonConfig?: ButtonProps
10+
secondaryButtonConfig?: ButtonProps
1011
children?: ReactNode
1112
contentClass?: string
1213
innerClass?: string
@@ -29,6 +30,16 @@ const ContentLayout: FC<ContentLayoutProps> = (props: ContentLayoutProps) => (
2930
{props.title}
3031
</h1>
3132

33+
{!!props.secondaryButtonConfig && (
34+
<div>
35+
<Button
36+
{...props.secondaryButtonConfig}
37+
secondary
38+
size='lg'
39+
/>
40+
</div>
41+
)}
42+
3243
{!!props.buttonConfig && (
3344
<div>
3445
<Button

0 commit comments

Comments
 (0)