Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #178 fix ui and bug admin portal #441

Merged
merged 1 commit into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/elements/src/components/Pagination/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const generatePagination = (currentPage: number, pageCount: number) => {

export const Pagination = ({ onChange, pageNumber = 1, pageSize = 1, totalCount = 1 }: PaginationProps) => {
const maxPage = Math.ceil(totalCount / pageSize)

if (maxPage < 2) {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/actions/__tests__/admin-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('adminApps actions', () => {

it('should create a adminAppsRequestData action', () => {
expect(adminAppsRequestData.type).toEqual(ActionTypes.ADMIN_APPS_REQUEST_DATA)
expect(adminAppsRequestData().data).toEqual(undefined)
expect(adminAppsRequestData({ pageNumber: 1 }).data).toEqual({ pageNumber: 1 })
})

it('should create a adminAppsRequestFailure action', () => {
Expand Down
9 changes: 8 additions & 1 deletion packages/marketplace/src/actions/admin-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ export type AdminAppsFeaturedParams = {
isFeatured: boolean
}

export const adminAppsRequestData = actionCreator<void>(ActionTypes.ADMIN_APPS_REQUEST_DATA)
export type AdminAppsParams = {
pageNumber?: number
appName?: string
developerName?: string
companyName?: string
}

export const adminAppsRequestData = actionCreator<AdminAppsParams>(ActionTypes.ADMIN_APPS_REQUEST_DATA)
export const adminAppsReceiveData = actionCreator<PagedResultAppSummaryModel_>(ActionTypes.ADMIN_APPS_RECEIVE_DATA)
export const adminAppsRequestFailure = actionCreator<void>(ActionTypes.ADMIN_APPS_REQUEST_FAILURE)
export const adminAppsRequestFeatured = actionCreator<AdminAppsFeaturedParams>(ActionTypes.ADMIN_APPS_REQUEST_FEATURED)
Expand Down
Loading