Skip to content

Commit

Permalink
refactor: clean up duplicated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Nov 25, 2024
1 parent c828dfc commit 4ebcaed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
RequestAcceptModalTrigger,
RequestDeclineModalTrigger,
RequestCancelModalTrigger,
RequestSubmitModalTrigger,
} from "@js/invenio_requests/components/ModalTriggers";
import {
AccessRequestIcon,
Expand Down Expand Up @@ -63,6 +64,7 @@ export const defaultContribComponents = {
[`RequestActionModalTrigger.accept`]: RequestAcceptModalTrigger,
[`RequestActionModalTrigger.decline`]: RequestDeclineModalTrigger,
[`RequestActionModalTrigger.cancel`]: RequestCancelModalTrigger,
[`RequestActionModalTrigger.submit`]: RequestSubmitModalTrigger,
[`InvenioRequests.RequestTypeIcon.layout.guest-access-request`]: AccessRequestIcon,
[`InvenioRequests.RequestTypeIcon.layout.user-access-request`]: AccessRequestIcon,
[`InvenioRequests.RequestTypeIcon.layout.community-inclusion`]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,12 @@
// Invenio RDM Records is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.

import {
RequestAcceptModalTrigger,
RequestCancelModalTrigger,
RequestDeclineModalTrigger,
RequestSubmitModalTrigger,
} from "@js/invenio_requests/components/ModalTriggers";
import { i18next } from "@translations/invenio_requests/i18next";
import React from "react";
import ReactDOM from "react-dom";
import { overrideStore } from "react-overridable";
import { InvenioRequestsApp } from "./InvenioRequestsApp";
import {
RequestAcceptButton,
RequestCancelButton,
RequestDeclineButton,
RequestSubmitButton,
} from "./components/Buttons";
import {
defaultContribComponents,
LabelTypeCommunityInclusion,
LabelTypeCommunityInvitation,
LabelTypeCommunitySubmission,
LabelTypeGuestAccess,
LabelTypeUserAccess,
LabelTypeCommunityManageRecord,
LabelTypeCommunitySubcommunity,
LabelTypeCommunitySubcommunityInvitation,
LabelTypeCommunityMembershipRequest,
} from "./contrib";
import { defaultContribComponents } from "./contrib";
import {
AcceptStatus,
CancelStatus,
Expand Down Expand Up @@ -72,25 +49,6 @@ const defaultComponents = {
"RequestStatus.layout.declined": DeclineStatus,
"RequestStatus.layout.cancelled": CancelStatus,
"RequestStatus.layout.expired": ExpireStatus,
"RequestTypeLabel.layout.community-submission": LabelTypeCommunitySubmission,
"RequestTypeLabel.layout.community-inclusion": LabelTypeCommunityInclusion,
"RequestTypeLabel.layout.community-invitation": LabelTypeCommunityInvitation,
"RequestTypeLabel.layout.guest-access-request": LabelTypeGuestAccess,
"RequestTypeLabel.layout.user-access-request": LabelTypeUserAccess,
"RequestTypeLabel.layout.community-manage-record": LabelTypeCommunityManageRecord,
"RequestTypeLabel.layout.subcommunity": LabelTypeCommunitySubcommunity,
"RequestTypeLabel.layout.subcommunity-invitation":
LabelTypeCommunitySubcommunityInvitation,
"RequestTypeLabel.layout.community-membership-request":
LabelTypeCommunityMembershipRequest,
"RequestActionModalTrigger.accept": RequestAcceptModalTrigger,
"RequestActionModalTrigger.decline": RequestDeclineModalTrigger,
"RequestActionModalTrigger.cancel": RequestCancelModalTrigger,
"RequestActionModalTrigger.submit": RequestSubmitModalTrigger,
"RequestActionButton.cancel": RequestCancelButton,
"RequestActionButton.accept": RequestAcceptButton,
"RequestActionButton.decline": RequestDeclineButton,
"RequestActionButton.submit": RequestSubmitButton,
"RequestActionModal.title.cancel": () => i18next.t("Cancel request"),
"RequestActionModal.title.accept": () => i18next.t("Accept request"),
"RequestActionModal.title.decline": () => i18next.t("Decline request"),
Expand Down

0 comments on commit 4ebcaed

Please sign in to comment.