EN · DE · RU · FR · ES

#2614: Action.jsx

projectforge-webapp/src/components/base/navigation/Action.jsx React JSX Component (Navigation Action), projectforge-webapp/src/components/base/navigation/Action.jsx 188 lines · 169 code · 6 comments · 13 blank
Multi-purpose navigation action component handling 5 action types via switch: RESTCALL — fetch GET with targetType dispatch (REDIRECT → history.push, RELOAD → window.location.reload, CHECK_AUTHENTICATION → loadUserStatus + redirect), DOWNLOAD — direct href to service URL, LINK / REDIRECT — React Router navigate with preserve location, MODAL — navigate with modal=true query param and background location state for overlay routing, TEXT — plain <span>. Supports badge counter via MenuBadge, tooltip via UncontrolledTooltip. Special CLASSIC id renders history clock icon. Uses Redux useDispatch for loadUserStatus(). Imports: FontAwesome, react-router, react-redux, MenuBadge, NavLink/UncontrolledTooltip from design.

Git History

e67067aa7 Migrate react-redux connect() to hooks (useSelector/useDispatch)
05bcb43b9 Modal dialog handling of history entries fixed.
c527aa3a9 wip: dependency lift edit pages
f867698d3 wip: lift package versions
3685edd6c lift to react 18 wip