Skip to content

Commit

Permalink
Merge pull request stakwork#846 from aliraza556/resolve-conflicts
Browse files Browse the repository at this point in the history
[Fixed]: Resolve conflicts in WidgetSwitchViewer file
  • Loading branch information
humansinstitute authored Jan 2, 2025
2 parents 80061de + 953e440 commit 9e80f21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/pages/superadmin/header/__tests__/SuperAdminHeader.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ describe('Header Component', () => {
const setWorkspaceMock = jest.fn();
const exportCSVText = 'Export CSV';

const { rerender } = render(
render(
<Header
startDate={moment().subtract(7, 'days').startOf('day').unix()}
endDate={moment().subtract('days').startOf('day').unix()} // Same year as startDate
endDate={moment().subtract('days').startOf('day').unix()}
setStartDate={setStartDateMock}
setEndDate={setEndDateMock}
workspace={''}
Expand Down Expand Up @@ -141,10 +141,10 @@ describe('Header Component', () => {
const setWorkspaceMock = jest.fn();
const exportCSVText = 'Export CSV';

const { rerender } = render(
render(
<Header
startDate={moment().subtract(1, 'year').startOf('day').unix()}
endDate={moment().subtract('days').startOf('day').unix()} // Same year as startDate
endDate={moment().subtract('days').startOf('day').unix()}
setStartDate={setStartDateMock}
setEndDate={setEndDateMock}
workspace={''}
Expand Down Expand Up @@ -268,7 +268,7 @@ describe('Header Component', () => {

expect(monthElement).toBeInTheDocument();

const expectedDateRange = `${moment.unix(startDate).format('DD MMM YYYY')} - ${moment
const expectedDateRange = `${moment.unix(startDate).format('DD MMM')} - ${moment
.unix(endDate)
.format('DD MMM YYYY')}`;
expect(monthElement).toHaveTextContent(expectedDateRange);
Expand Down
6 changes: 4 additions & 2 deletions src/people/widgetViews/WidgetSwitchViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function WidgetSwitchViewer(props: any) {
page: propsPage,
setPage,
languageString,
isBountyLandingPage,
activeWorkspace,
uuid,
orgQueryLimit,
Expand All @@ -104,8 +105,8 @@ function WidgetSwitchViewer(props: any) {
minHeight: 132
}
: {
minWidth: '1100px',
maxWidth: '1100px',
minWidth: isBountyLandingPage ? '900px' : '1100px',
maxWidth: isBountyLandingPage ? '900px' : '1100px',
marginBottom: 16,
borderRadius: '10px',
display: 'flex',
Expand Down Expand Up @@ -298,6 +299,7 @@ function WidgetSwitchViewer(props: any) {
}}
person={person}
showModal={showModal}
isBountyLandingPage={isBountyLandingPage}
setDeletePayload={setDeletePayload}
fromBountyPage={props.fromBountyPage}
activeWorkspace={activeWorkspace}
Expand Down

0 comments on commit 9e80f21

Please sign in to comment.