Skip to content

Commit

Permalink
WIP - more RTK Query.
Browse files Browse the repository at this point in the history
tdilauro committed Jul 8, 2024
1 parent 9401ed1 commit 380655c
Showing 9 changed files with 271 additions and 194 deletions.
44 changes: 22 additions & 22 deletions src/actions.ts
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ import {
CustomListsData,
LanesData,
LaneData,
RolesData,
MediaData,
LanguagesData,
// RolesData,
// MediaData,
// LanguagesData,
RightsStatusData,
CatalogServicesData,
SelfTestsData,
@@ -46,9 +46,9 @@ export default class ActionCreator extends BaseActionCreator {
static readonly UPDATE_CLEAR_FILTERS_FLAG = "UPDATE_CLEAR_FILTERS_FLAG";
static readonly EDIT_BOOK = "EDIT_BOOK";
static readonly BOOK_ADMIN = "BOOK_ADMIN";
static readonly ROLES = "ROLES";
static readonly MEDIA = "MEDIA";
static readonly LANGUAGES = "LANGUAGES";
// static readonly ROLES = "ROLES";
// static readonly MEDIA = "MEDIA";
// static readonly LANGUAGES = "LANGUAGES";
static readonly RIGHTS_STATUSES = "RIGHTS_STATUSES";
static readonly COMPLAINTS = "COMPLAINTS";
static readonly POST_COMPLAINT = "POST_COMPLAINT";
@@ -320,22 +320,22 @@ export default class ActionCreator extends BaseActionCreator {
};
}

fetchRoles() {
const url = "/admin/roles";
return this.fetchJSON<RolesData>(ActionCreator.ROLES, url).bind(this);
}

fetchMedia() {
const url = "/admin/media";
return this.fetchJSON<MediaData>(ActionCreator.MEDIA, url).bind(this);
}

fetchLanguages() {
const url = "/admin/languages";
return this.fetchJSON<LanguagesData>(ActionCreator.LANGUAGES, url).bind(
this
);
}
// fetchRoles() {
// const url = "/admin/roles";
// return this.fetchJSON<RolesData>(ActionCreator.ROLES, url).bind(this);
// }
//
// fetchMedia() {
// const url = "/admin/media";
// return this.fetchJSON<MediaData>(ActionCreator.MEDIA, url).bind(this);
// }
//
// fetchLanguages() {
// const url = "/admin/languages";
// return this.fetchJSON<LanguagesData>(ActionCreator.LANGUAGES, url).bind(
// this
// );
// }

fetchRightsStatuses() {
const url = "/admin/rights_status";
78 changes: 59 additions & 19 deletions src/components/BookDetailsEditor.tsx
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import UpdatingLoader from "./UpdatingLoader";
import { getBookData, submitBookData } from "../features/book/bookEditorSlice";
import BookDetailsEditorSuppression from "./BookDetailsEditorSuppression";
import { bookEditorApiEndpoints } from "../features/book/bookEditorSlice";
import { adminApi } from "../features/api/admin";

export interface BookDetailsEditorOwnProps {
bookUrl?: string;
@@ -26,22 +27,27 @@ export type BookDetailsEditorProps = ConnectedProps<typeof connector> &

/** Tab for editing a book's metadata on the book details page. */
export class BookDetailsEditor extends React.Component<BookDetailsEditorProps> {
// RTK Query subscriptions.
rolesSubscription;
mediaSubscription;
languagesSubscription;

constructor(props: BookDetailsEditorProps) {
super(props);
this.postWithoutPayload = this.postWithoutPayload.bind(this);
this.hide = this.hide.bind(this);
this.restore = this.restore.bind(this);
this.refreshMetadata = this.refreshMetadata.bind(this);
this.refresh = this.refresh.bind(this);
this.subscribe = this.subscribe.bind(this);
this.unsubscribe = this.unsubscribe.bind(this);
}

UNSAFE_componentWillMount() {
if (this.props.bookUrl) {
const bookAdminUrl = this.props.bookUrl.replace("works", "admin/works");
this.props.fetchBookData(bookAdminUrl);
this.props.fetchRoles();
this.props.fetchMedia();
this.props.fetchLanguages();
this.subscribe();
}
}

@@ -52,8 +58,31 @@ export class BookDetailsEditor extends React.Component<BookDetailsEditorProps> {
}
}

componentWillUnmount() {
this.unsubscribe();
}

subscribe() {
// subscribe to RTK Query caches and fetch, as needed.
this.rolesSubscription = this.props.fetchRoles();
this.mediaSubscription = this.props.fetchMedia();
this.languagesSubscription = this.props.fetchLanguages();
}

unsubscribe() {
// Unsubscribe from the RTK Query caches.
this.rolesSubscription.unsubscribe();
this.mediaSubscription.unsubscribe();
this.languagesSubscription.unsubscribe();
}

render(): React.ReactElement {
const { bookData } = this.props;
const errorString =
"response" in this.props.fetchError &&
typeof this.props.fetchError.response === "string"
? this.props.fetchError.response
: JSON.stringify(this.props.fetchError);
return (
<div className="book-details-editor">
{bookData && !this.props.fetchError && (
@@ -144,9 +173,9 @@ export class BookDetailsEditor extends React.Component<BookDetailsEditorProps> {
{bookData.editLink && (
<BookEditForm
{...bookData}
roles={this.props.roles}
media={this.props.media}
languages={this.props.languages}
roles={this.props.roles.data}
media={this.props.media.data}
languages={this.props.languages.data}
disabled={this.props.isFetching}
editBook={this.props.postBookData}
refresh={this.refresh}
@@ -155,7 +184,14 @@ export class BookDetailsEditor extends React.Component<BookDetailsEditorProps> {
</>
)}
{this.props.fetchError && (
<ErrorMessage error={this.props.fetchError} tryAgain={this.refresh} />
<ErrorMessage
error={{
url: this.props.bookAdminUrl,
response: errorString,
status: null,
}}
tryAgain={this.refresh}
/>
)}
</div>
);
@@ -184,22 +220,26 @@ export class BookDetailsEditor extends React.Component<BookDetailsEditorProps> {
}

function mapStateToProps(state: RootState) {
const roles = adminApi.endpoints.getRoles.select()(state);
const media = adminApi.endpoints.getMedia.select()(state);
const languages = adminApi.endpoints.getLanguages.select()(state);

return {
bookAdminUrl: state.bookEditor.url,
bookData: state.bookEditor.data,
roles: state.editor.roles.data,
media: state.editor.media.data,
languages: state.editor.languages.data,
roles,
media,
languages,
isFetching:
state.bookEditor.isFetching ||
state.editor.roles.isFetching ||
state.editor.media.isFetching ||
state.editor.languages.isFetching,
roles.isLoading ||
media.isLoading ||
languages.isLoading,
fetchError:
state.bookEditor.fetchError ||
state.editor.roles.fetchError ||
state.editor.media.fetchError ||
state.editor.languages.fetchError,
roles.error ||
media.error ||
languages.error,
editError: state.bookEditor.editError,
};
}
@@ -214,9 +254,9 @@ function mapDispatchToProps(
postBookData: (url: string, data: FormData | null) =>
dispatch(submitBookData({ url, data, csrfToken: ownProps.csrfToken })),
fetchBookData: (url: string) => dispatch(getBookData({ url })),
fetchRoles: () => dispatch(actions.fetchRoles()),
fetchMedia: () => dispatch(actions.fetchMedia()),
fetchLanguages: () => dispatch(actions.fetchLanguages()),
fetchRoles: () => dispatch(adminApi.endpoints.getLanguages.initiate()),
fetchMedia: () => dispatch(adminApi.endpoints.getMedia.initiate()),
fetchLanguages: () => dispatch(adminApi.endpoints.getRoles.initiate()),
suppressBook: (url: string) =>
dispatch(
bookEditorApiEndpoints.endpoints.suppressBook.initiate({
218 changes: 119 additions & 99 deletions src/components/CustomLists.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable react/no-deprecated */
import * as React from "react";
import { Store } from "@reduxjs/toolkit";
import { connect } from "react-redux";
import { connect, ConnectedProps } from "react-redux";
import * as PropTypes from "prop-types";
import { RootState } from "../store";
import { AppDispatch, RootState } from "../store";
import ActionCreator from "../actions";
import DataFetcher from "@thepalaceproject/web-opds-client/lib/DataFetcher";
import { adapter } from "@thepalaceproject/web-opds-client/lib/OPDSDataAdapter";
@@ -32,82 +32,85 @@ import CustomListEditor from "./CustomListEditor";
import LoadingIndicator from "@thepalaceproject/web-opds-client/lib/components/LoadingIndicator";
import ErrorMessage from "./ErrorMessage";
import CustomListsSidebar from "./CustomListsSidebar";

export interface CustomListsStateProps {
customListEditorAutoUpdateStatus?: string;
customListEditorProperties?: CustomListEditorProperties;
customListEditorSavedName?: string;
customListEditorSearchParams?: CustomListEditorSearchParams;
customListEditorEntries?: CustomListEditorEntriesData;
customListEditorIsLoaded?: boolean;
customListEditorIsOwner?: boolean;
customListEditorIsShared?: boolean;
customListEditorIsSharePending?: boolean;
customListEditorIsValid?: boolean;
customListEditorIsModified?: boolean;
customListEditorIsSearchModified?: boolean;
customListEditorIsAutoUpdateEnabled?: boolean;
FiltersEnabled?: boolean;
lists: CustomListData[];
listDetails?: CollectionData;
collections: AdminCollectionData[];
searchResults: CollectionData;
fetchError?: FetchErrorData;
isFetching: boolean;
isFetchingSearchResults: boolean;
isFetchingMoreSearchResults: boolean;
isFetchingMoreCustomListEntries: boolean;
libraries?: LibraryData[];
lanes?: LaneData[];
languages?: LanguagesData;
}

export interface CustomListsDispatchProps {
fetchLanes: () => Promise<LanesData>;
fetchCustomLists: () => Promise<CustomListsData>;
fetchCustomListDetails: (listId: string) => Promise<CollectionData>;
openCustomListEditor: (listId: string) => void;
saveCustomListEditor: () => Promise<void>;
resetCustomListEditor?: () => void;
executeCustomListEditorSearch?: () => void;
updateCustomListEditorProperty?: (name: string, value) => void;
toggleCustomListEditorCollection?: (id: number) => void;
updateCustomListEditorSearchParam?: (name: string, value) => void;
addCustomListEditorAdvSearchQuery?: (
builderName: string,
query: AdvancedSearchQuery
) => void;
updateClearFiltersFlag?: (builderName: string, value: boolean) => void;
updateCustomListEditorAdvSearchQueryBoolean?: (
builderName: string,
id: string,
bool: string
) => void;
moveCustomListEditorAdvSearchQuery?: (
builderName: string,
id: string,
targetId: string
) => void;
removeCustomListEditorAdvSearchQuery?: (
builderName: string,
id: string
) => void;
selectCustomListEditorAdvSearchQuery?: (
builderName: string,
id: string
) => void;
addCustomListEditorEntry?: (id: string) => void;
addAllCustomListEditorEntries?: () => void;
deleteCustomListEditorEntry?: (id: string) => void;
deleteAllCustomListEditorEntries?: () => void;
deleteCustomList: (listId: string) => Promise<void>;
shareCustomList?: (listId: string) => Promise<void>;
loadMoreSearchResults: () => void;
loadMoreEntries: () => void;
fetchCollections: () => Promise<CollectionsData>;
fetchLibraries: () => void;
fetchLanguages: () => void;
}
import { adminApi } from "../features/api/admin";
import { BookDetailsEditorOwnProps } from "./BookDetailsEditor";
import { Root } from "@thepalaceproject/web-opds-client/lib/components/Root";

// export interface CustomListsStateProps {
// customListEditorAutoUpdateStatus?: string;
// customListEditorProperties?: CustomListEditorProperties;
// customListEditorSavedName?: string;
// customListEditorSearchParams?: CustomListEditorSearchParams;
// customListEditorEntries?: CustomListEditorEntriesData;
// customListEditorIsLoaded?: boolean;
// customListEditorIsOwner?: boolean;
// customListEditorIsShared?: boolean;
// customListEditorIsSharePending?: boolean;
// customListEditorIsValid?: boolean;
// customListEditorIsModified?: boolean;
// customListEditorIsSearchModified?: boolean;
// customListEditorIsAutoUpdateEnabled?: boolean;
// FiltersEnabled?: boolean;
// lists: CustomListData[];
// listDetails?: CollectionData;
// collections: AdminCollectionData[];
// searchResults: CollectionData;
// fetchError?: FetchErrorData;
// isFetching: boolean;
// isFetchingSearchResults: boolean;
// isFetchingMoreSearchResults: boolean;
// isFetchingMoreCustomListEntries: boolean;
// libraries?: LibraryData[];
// lanes?: LaneData[];
// languages?: LanguagesData;
// }

// export interface CustomListsDispatchProps {
// fetchLanes: () => Promise<LanesData>;
// fetchCustomLists: () => Promise<CustomListsData>;
// fetchCustomListDetails: (listId: string) => Promise<CollectionData>;
// openCustomListEditor: (listId: string) => void;
// saveCustomListEditor: () => Promise<void>;
// resetCustomListEditor?: () => void;
// executeCustomListEditorSearch?: () => void;
// updateCustomListEditorProperty?: (name: string, value) => void;
// toggleCustomListEditorCollection?: (id: number) => void;
// updateCustomListEditorSearchParam?: (name: string, value) => void;
// addCustomListEditorAdvSearchQuery?: (
// builderName: string,
// query: AdvancedSearchQuery
// ) => void;
// updateClearFiltersFlag?: (builderName: string, value: boolean) => void;
// updateCustomListEditorAdvSearchQueryBoolean?: (
// builderName: string,
// id: string,
// bool: string
// ) => void;
// moveCustomListEditorAdvSearchQuery?: (
// builderName: string,
// id: string,
// targetId: string
// ) => void;
// removeCustomListEditorAdvSearchQuery?: (
// builderName: string,
// id: string
// ) => void;
// selectCustomListEditorAdvSearchQuery?: (
// builderName: string,
// id: string
// ) => void;
// addCustomListEditorEntry?: (id: string) => void;
// addAllCustomListEditorEntries?: () => void;
// deleteCustomListEditorEntry?: (id: string) => void;
// deleteAllCustomListEditorEntries?: () => void;
// deleteCustomList: (listId: string) => Promise<void>;
// shareCustomList?: (listId: string) => Promise<void>;
// loadMoreSearchResults: () => void;
// loadMoreEntries: () => void;
// fetchCollections: () => Promise<CollectionsData>;
// fetchLibraries: () => void;
// fetchLanguages: () => void;
// }

export interface CustomListsOwnProps {
store?: Store<RootState>;
@@ -118,24 +121,29 @@ export interface CustomListsOwnProps {
startingTitle?: string;
}

export interface CustomListsProps
extends React.Props<CustomListsProps>,
CustomListsStateProps,
CustomListsDispatchProps,
CustomListsOwnProps {}
// export interface CustomListsProps
// extends React.Props<CustomListsProps>,
// CustomListsStateProps,
// CustomListsDispatchProps,
// CustomListsOwnProps {}

export interface CustomListsState {
filter: string;
sort: string;
}

const connector = connect(mapStateToProps, mapDispatchToProps);
export type CustomListsProps = ConnectedProps<typeof connector> &
CustomListsOwnProps;

/** Body of the custom lists page, with all a library's lists shown in a left sidebar and
a list editor on the right. */
export class CustomLists extends React.Component<
CustomListsProps,
CustomListsState
> {
context: { admin: Admin };
languagesSubscription;

static contextTypes = {
admin: PropTypes.object.isRequired,
@@ -148,12 +156,25 @@ export class CustomLists extends React.Component<
this.changeFilter = this.changeFilter.bind(this);
this.changeSort = this.changeSort.bind(this);
this.getEnabledEntryPoints = this.getEnabledEntryPoints.bind(this);
this.subscribe = this.subscribe.bind(this);
this.unsubscribe = this.unsubscribe.bind(this);

this.state = {
filter: "owned",
sort: "asc",
};
}

subscribe() {
// Subscribe to RTK Query caches and fetch, as needed.
this.languagesSubscription = this.props.fetchLanguages();
}

unsubscribe() {
// Unsubscribe from RTK Query caches.
this.languagesSubscription.unsubscribe();
}

render(): JSX.Element {
return (
<main className="custom-lists-container">
@@ -210,7 +231,7 @@ export class CustomLists extends React.Component<
.isFetchingMoreCustomListEntries,
isFetchingSearchResults: this.props.isFetchingSearchResults,
isFetchingMoreSearchResults: this.props.isFetchingMoreSearchResults,
languages: this.props.languages,
languages: this.props.languages.data,
library: this.props.libraries?.find(
(l) => l.short_name === this.props.library
),
@@ -266,7 +287,8 @@ export class CustomLists extends React.Component<

fetchCollections?.();
fetchLibraries?.();
fetchLanguages?.();

this.subscribe();
}

UNSAFE_componentWillReceiveProps(nextProps) {
@@ -303,6 +325,10 @@ export class CustomLists extends React.Component<
}
}

componentWillUnmount() {
this.unsubscribe();
}

changeFilter(filter) {
this.setState({ filter });
}
@@ -444,7 +470,7 @@ export class CustomLists extends React.Component<
}
}

function mapStateToProps(state, ownProps) {
function mapStateToProps(state: RootState, ownProps: CustomListsOwnProps) {
return {
customListEditorProperties:
state.editor.customListEditor.properties.current,
@@ -492,14 +518,17 @@ function mapStateToProps(state, ownProps) {
state.editor.collections &&
state.editor.collections.data &&
state.editor.collections.data.collections,
languages: state.editor.languages && state.editor.languages.data,
languages: adminApi.endpoints.getLanguages.select()(state),
libraries:
state.editor.libraries.data && state.editor.libraries.data.libraries,
lanes: state.editor.lanes.data && state.editor.lanes.data.lanes,
};
}

function mapDispatchToProps(dispatch, ownProps) {
function mapDispatchToProps(
dispatch: AppDispatch,
ownProps: CustomListsOwnProps
) {
const fetcher = new DataFetcher({ adapter });
const actions = new ActionCreator(fetcher, ownProps.csrfToken);
return {
@@ -527,7 +556,7 @@ function mapDispatchToProps(dispatch, ownProps) {
fetchCollections: () => dispatch(actions.fetchCollections()),
fetchLibraries: () => dispatch(actions.fetchLibraries()),
fetchLanes: () => dispatch(actions.fetchLanes(ownProps.library)),
fetchLanguages: () => dispatch(actions.fetchLanguages()),
fetchLanguages: () => dispatch(adminApi.endpoints.getRoles.initiate()),
updateCustomListEditorProperty: (name: string, value) =>
dispatch(actions.updateCustomListEditorProperty(name, value)),
toggleCustomListEditorCollection: (id: number) =>
@@ -587,13 +616,4 @@ function mapDispatchToProps(dispatch, ownProps) {
};
}

const ConnectedCustomLists = connect<
CustomListsStateProps,
CustomListsDispatchProps,
CustomListsOwnProps
>(
mapStateToProps,
mapDispatchToProps
)(CustomLists as any);

export default ConnectedCustomLists;
export default connector(CustomLists as any);
62 changes: 32 additions & 30 deletions src/components/Libraries.tsx
Original file line number Diff line number Diff line change
@@ -5,31 +5,22 @@ import {
EditableConfigListDispatchProps,
EditableConfigListOwnProps,
} from "./EditableConfigList";
import { connect } from "react-redux";
import { connect, ConnectedProps } from "react-redux";
import * as PropTypes from "prop-types";
import ActionCreator from "../actions";
import { LibrariesData, LibraryData, LanguagesData } from "../interfaces";
import Admin from "../models/Admin";
import LibraryEditForm from "./LibraryEditForm";
import { adminApi } from "../features/api/admin";
import { AppDispatch, RootState } from "../store";

/** Right panel for library configuration on the system configuration page.
Shows a list of current libraries and allows creating a new library or
editing or deleting an existing library. */

export interface LibrariesStateProps
extends EditableConfigListStateProps<LibrariesData> {
additionalData?: LanguagesData;
}

export interface LibrariesDispatchProps
extends EditableConfigListDispatchProps<LibrariesData> {
fetchLanguages: () => void;
}

export interface LibrariesProps
extends LibrariesStateProps,
LibrariesDispatchProps,
EditableConfigListOwnProps {}
const connector = connect(mapStateToProps, mapDispatchToProps);
export type LibrariesProps = ConnectedProps<typeof connector> &
EditableConfigListOwnProps;

export class Libraries extends GenericEditableConfigList<
LibrariesData,
@@ -48,9 +39,26 @@ export class Libraries extends GenericEditableConfigList<
admin: PropTypes.object.isRequired,
};

// RTK Query subscriptions.
languagesSubscription;

UNSAFE_componentWillMount() {
super.UNSAFE_componentWillMount();
this.props.fetchLanguages();
this.subscribe();
}

componentWillUnmount() {
this.unsubscribe();
}

subscribe() {
// Subscribe to RTK Query caches and fetch, as needed.
this.languagesSubscription = this.props.fetchLanguages();
}

unsubscribe() {
// Unsubscribe from RTK Query caches.
this.languagesSubscription.unsubscribe();
}

label(item): string {
@@ -66,7 +74,7 @@ export class Libraries extends GenericEditableConfigList<
}
}

function mapStateToProps(state, ownProps) {
function mapStateToProps(state: RootState) {
// fetchError = an error involving loading the list of libraries; formError = an error upon submission of the
// create/edit form.
return {
@@ -77,28 +85,22 @@ function mapStateToProps(state, ownProps) {
formError: state.editor.libraries.formError,
isFetching:
state.editor.libraries.isFetching || state.editor.libraries.isEditing,
additionalData: state.editor.languages && state.editor.languages.data,
additionalData: adminApi.endpoints.getLanguages.select()(state).data,
};
}

function mapDispatchToProps(dispatch, ownProps) {
function mapDispatchToProps(
dispatch: AppDispatch,
ownProps: EditableConfigListOwnProps
) {
const actions = new ActionCreator(null, ownProps.csrfToken);
return {
fetchData: () => dispatch(actions.fetchLibraries()),
editItem: (data: FormData) => dispatch(actions.editLibrary(data)),
deleteItem: (identifier: string | number) =>
dispatch(actions.deleteLibrary(identifier)),
fetchLanguages: () => dispatch(actions.fetchLanguages()),
fetchLanguages: () => dispatch(adminApi.endpoints.getRoles.initiate()),
};
}

const ConnectedLibraries = connect<
EditableConfigListStateProps<LibrariesData>,
EditableConfigListDispatchProps<LibrariesData>,
EditableConfigListOwnProps
>(
mapStateToProps,
mapDispatchToProps
)(Libraries);

export default ConnectedLibraries;
export default connector(Libraries);
15 changes: 15 additions & 0 deletions src/features/api/admin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { api } from "./apiSlice";

export const adminApi = api.injectEndpoints({
endpoints: (builder) => ({
getLanguages: builder.query({
query: (arg: void) => "/admin/languages",
}),
getMedia: builder.query({
query: (arg: void) => "/admin/media",
}),
getRoles: builder.query({
query: (arg: void) => "/admin/roles",
}),
}),
});
18 changes: 9 additions & 9 deletions src/reducers/index.ts
Original file line number Diff line number Diff line change
@@ -27,9 +27,9 @@ import laneVisibility from "./laneVisibility";
import resetLanes from "./resetLanes";
import laneOrder from "./laneOrder";
import selfTests from "./selfTests";
import roles from "./roles";
import media from "./media";
import languages from "./languages";
// import roles from "./roles";
// import media from "./media";
// import languages from "./languages";
import rightsStatuses from "./rightsStatuses";
import collection, {
CollectionState,
@@ -90,9 +90,9 @@ export interface State {
resetLanes: FetchEditState<void>;
laneOrder: FetchEditState<void>;
selfTests: FetchEditState<ServiceData>;
roles: FetchEditState<RolesData>;
media: FetchEditState<MediaData>;
languages: FetchEditState<LanguagesData>;
// roles: FetchEditState<RolesData>;
// media: FetchEditState<MediaData>;
// languages: FetchEditState<LanguagesData>;
rightsStatuses: FetchEditState<RightsStatusData>;
changePassword: FetchEditState<void>;
patronManager: FetchEditState<PatronData>;
@@ -126,9 +126,9 @@ export default combineReducers<State>({
resetLanes,
laneOrder,
selfTests,
roles,
media,
languages,
// roles,
// media,
// languages,
rightsStatuses,
changePassword,
patronManager,
10 changes: 5 additions & 5 deletions src/reducers/languages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LanguagesData } from "../interfaces";
import ActionCreator from "../actions";
import createFetchEditReducer from "./createFetchEditReducer";

export default createFetchEditReducer<LanguagesData>(ActionCreator.LANGUAGES);
// import { LanguagesData } from "../interfaces";
// import ActionCreator from "../actions";
// import createFetchEditReducer from "./createFetchEditReducer";
//
// export default createFetchEditReducer<LanguagesData>(ActionCreator.LANGUAGES);
10 changes: 5 additions & 5 deletions src/reducers/media.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MediaData } from "../interfaces";
import ActionCreator from "../actions";
import createFetchEditReducer from "./createFetchEditReducer";

export default createFetchEditReducer<MediaData>(ActionCreator.MEDIA);
// import { MediaData } from "../interfaces";
// import ActionCreator from "../actions";
// import createFetchEditReducer from "./createFetchEditReducer";
//
// export default createFetchEditReducer<MediaData>(ActionCreator.MEDIA);
10 changes: 5 additions & 5 deletions src/reducers/roles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RolesData } from "../interfaces";
import ActionCreator from "../actions";
import createFetchEditReducer from "./createFetchEditReducer";

export default createFetchEditReducer<RolesData>(ActionCreator.ROLES);
// import { RolesData } from "../interfaces";
// import ActionCreator from "../actions";
// import createFetchEditReducer from "./createFetchEditReducer";
//
// export default createFetchEditReducer<RolesData>(ActionCreator.ROLES);

0 comments on commit 380655c

Please sign in to comment.