add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import * as React from 'react';
function toArray(val) {
return val ? Array.isArray(val) ? val : [val] : [];
}
export default function useAction(mobile, action, showAction, hideAction) {
return React.useMemo(function () {
var mergedShowAction = toArray(showAction !== null && showAction !== void 0 ? showAction : action);
var mergedHideAction = toArray(hideAction !== null && hideAction !== void 0 ? hideAction : action);
var showActionSet = new Set(mergedShowAction);
var hideActionSet = new Set(mergedHideAction);
if (mobile) {
if (showActionSet.has('hover')) {
showActionSet.delete('hover');
showActionSet.add('click');
}
if (hideActionSet.has('hover')) {
hideActionSet.delete('hover');
hideActionSet.add('click');
}
}
return [showActionSet, hideActionSet];
}, [mobile, action, showAction, hideAction]);
}