From ee08af152d0aba127828f1392c5b7717501e1ad4 Mon Sep 17 00:00:00 2001 From: Tharki-God Date: Sat, 13 Jul 2024 15:03:24 +0530 Subject: [PATCH] platform indicator always first --- src/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index a3f0cf7..eca0071 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -110,6 +110,12 @@ function patchProfile(PlatformIndicatorProps: { if (icon === null) return args; // to prevent adding an empty div const a = {icon}; profileHeader.props.children.unshift(a); + profileHeader.props.children.unshift = (...args: unknown[]) => { + const item = profileHeader.props.children.splice(0, 1); + Array.prototype.unshift.apply(profileHeader.props.children, args); + Array.prototype.unshift.apply(profileHeader.props.children, item); + return profileHeader.props.children.length; + }; return args; }); }