fix: share music
This commit is contained in:
+15
-2
@@ -46,6 +46,19 @@ export default ({
|
||||
|
||||
const computedWidth = width ?? (isWeb ? "60%" : "100%");
|
||||
|
||||
const shareButtonElement = (() => {
|
||||
if (!shareBtn) return null;
|
||||
if (typeof React?.isValidElement === "function") {
|
||||
if (React.isValidElement(shareBtn)) {
|
||||
return shareBtn;
|
||||
}
|
||||
}
|
||||
if (typeof shareBtn === "object" && !Array.isArray(shareBtn)) {
|
||||
return <ShareBtn {...shareBtn} />;
|
||||
}
|
||||
return <ShareBtn />;
|
||||
})();
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
@@ -119,7 +132,7 @@ export default ({
|
||||
</PageContainer>
|
||||
|
||||
{bottomStickyContent?.()}
|
||||
{(shareBtn || connect) && isWeb && (
|
||||
{(shareButtonElement || connect) && isWeb && (
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
@@ -130,7 +143,7 @@ export default ({
|
||||
gap: 12, // ou marginLeft sur chaque bouton si gap non supporté
|
||||
}}
|
||||
>
|
||||
{shareBtn && <ShareBtn />}
|
||||
{shareButtonElement}
|
||||
{connect && <ConnectBtn />}
|
||||
</View>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user