UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

19 lines (18 loc) 475 B
import { useInRouterContext as r, Link as i } from "react-router"; import { isExternalLink as a } from "../../utils/functions/IsExternalLink.js"; function u(n, t) { const e = r(), o = n ? a(n) : !1; return n && e && !o ? { component: i, to: n } : { component: n ? "a" : void 0, href: n, target: t ?? (o ? "_blank" : void 0), rel: o ? "noopener noreferrer" : void 0 }; } export { u as useSmartLink }; //# sourceMappingURL=useSmartLink.js.map