From c4bf532cdf1262d8065e4105b10628c09a7527f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=B3=E5=90=88=20=E4=BF=8A=E5=85=B8?= <6syun9@gmail.com> Date: Sat, 22 Jun 2024 09:11:27 +0900 Subject: [PATCH] update share button --- torisetsu/src/jsMain/kotlin/components/base/XShareButton.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torisetsu/src/jsMain/kotlin/components/base/XShareButton.kt b/torisetsu/src/jsMain/kotlin/components/base/XShareButton.kt index d898a99..8e390fb 100644 --- a/torisetsu/src/jsMain/kotlin/components/base/XShareButton.kt +++ b/torisetsu/src/jsMain/kotlin/components/base/XShareButton.kt @@ -1,6 +1,7 @@ package components.base import androidx.compose.runtime.Composable +import kotlinx.browser.window import org.jetbrains.compose.web.attributes.ATarget import org.jetbrains.compose.web.attributes.target import org.jetbrains.compose.web.dom.A @@ -11,7 +12,7 @@ import org.jetbrains.compose.web.dom.Text @Composable fun XShareButton() { A( - href = "https://twitter.com/intent/tweet?text=私のトリタイプが見つかりました!&url=https://m3dev.github.io/torisetsu&hashtags=エンジニアトリ診断", + href = "https://twitter.com/intent/tweet?text=私のトリタイプが見つかりました!&url=" + window.location.href + "&hashtags=エンジニアトリ診断", attrs = { target(ATarget.Blank) classes(XShareButtonStyle.rootElm)