UNPKG

create-nova-vite-template

Version:

This is a dashboard template built with React and Vite. It provides a modern and responsive user interface for building web applications.

20 lines (14 loc) 427 B
import { Action, isRejectedWithValue } from "@reduxjs/toolkit"; type NextFunction = (action: Action) => void; interface RejectedAction extends Action { payload: { data: unknown; }; } const rtkQueryErrorLogger = () => (next: NextFunction) => (action: RejectedAction) => { if (isRejectedWithValue(action)) { console.error(action.payload.data); } return next(action); }; export default rtkQueryErrorLogger;