Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaAmega committed Dec 5, 2024
1 parent 770b989 commit 1c280fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,9 @@ export const getDataRange = ({
min_timestamp,
max_timestamp
}: { min_timestamp?: string | null; max_timestamp?: string | null }) => {
const [from, to] = [getValidDate(min_timestamp), getValidDate(max_timestamp)]
const [minDate, maxDate] = [getValidDate(min_timestamp), getValidDate(max_timestamp)]

const dateRange = {
...(from ? { minDate: from } : null),
...(to ? { maxDate: to } : null)
}

return dateRange
return { minDate, maxDate }
}

export const useDashboardFilterParamsDebounced = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ export const getSnapshotsActionSpecial =

if (action === 'reload-snapshots') {
const { projectId } = data

return reloadSnapshots({ api, projectId })
}

if (action === 'delete-snapshot') {
const { snapshotId, projectId } = data

return deleteSnapshot({ api, snapshotId, projectId })
}

Expand Down
8 changes: 5 additions & 3 deletions ui/service/src/_routes/src/project/project-main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export const Component = () => {
const isReports = useMatchRouter({ path: '/:projectId/reports' })
const isTestSuites = useMatchRouter({ path: '/:projectId/test-suites' })

const { projectId } = params

const selectedTab = isReports ? TABS.reports : isTestSuites ? TABS['test-suites'] : TABS.index

return (
Expand All @@ -81,23 +83,23 @@ export const Component = () => {
value={TABS.index}
label={'Dashboard'}
to='/:projectId/?index'
paramsToReplace={{ projectId: params.projectId }}
paramsToReplace={{ projectId }}
/>

<RouterLink
type='tab'
value={TABS.reports}
label={'Reports'}
to='/:projectId/reports'
paramsToReplace={{ projectId: params.projectId }}
paramsToReplace={{ projectId }}
/>

<RouterLink
type='tab'
value={TABS['test-suites']}
label={'Test suites'}
to='/:projectId/test-suites'
paramsToReplace={{ projectId: params.projectId }}
paramsToReplace={{ projectId }}
/>
</Tabs>

Expand Down

0 comments on commit 1c280fe

Please sign in to comment.