Files
url_tracker_tool/node_modules/use-sidecar/dist/es5/hoc.js
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

20 lines
755 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sidecar = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var hook_1 = require("./hook");
// eslint-disable-next-line @typescript-eslint/ban-types
function sidecar(importer, errorComponent) {
var ErrorCase = function () { return errorComponent; };
return function Sidecar(props) {
var _a = (0, hook_1.useSidecar)(importer, props.sideCar), Car = _a[0], error = _a[1];
if (error && errorComponent) {
return ErrorCase;
}
// @ts-expect-error type shenanigans
return Car ? React.createElement(Car, tslib_1.__assign({}, props)) : null;
};
}
exports.sidecar = sidecar;