Skip to content

Commit 246f746

Browse files
fix(jwt): sharing by url: properly construct link;
1 parent 7d0fabc commit 246f746

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jwt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::jwt::jwt::editor::JwtEditor;
1919
use crate::jwt::jwt::viewer::JwtViewer;
2020
use crate::jwt::jwt_utils::JwtUtils;
2121
use crate::jwt::jwte::Jwte;
22-
use crate::url_query_params;
22+
use crate::url_query_params::{self, generate_jwt_link};
2323

2424
const JWT_LOCAL_STORAGE_KEY: &str = "JWT_DATA";
2525
const TEST_JWT: &str = "eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTY3MDAwNDI1NCwiaWF0IjoxNjcwMDA0MjU0fQ.ZGsN42vr-bM4uxXowtlNl7xRerkdKu6i29VS8DFQ4Tw";
@@ -167,7 +167,7 @@ pub fn jwt() -> Html {
167167
let notifications = use_notification::<Notification>();
168168
let clipboard = use_clipboard();
169169
let share_by_link = Callback::from(move |_| {
170-
clipboard.write_text(jwt_to_copy.clone());
170+
clipboard.write_text(generate_jwt_link(jwt_to_copy.clone()));
171171

172172
notifications.spawn(Notification::from_description_and_type(
173173
NotificationType::Info,

0 commit comments

Comments
 (0)