From d67e184a443072dc40851a04d863f2fea199989a Mon Sep 17 00:00:00 2001 From: carboxaminoo Date: Thu, 7 Mar 2024 11:07:26 +0900 Subject: [PATCH] Feat : Add result connection - #8 --- .../components/button/moving_filled.svelte | 14 ++++- mz_v1_front/src/routes/result/+page.svelte | 46 +++++++++++++-- .../src/routes/resultlist/+page.svelte | 56 +++++++++++++------ 3 files changed, 92 insertions(+), 24 deletions(-) diff --git a/mz_v1_front/src/components/button/moving_filled.svelte b/mz_v1_front/src/components/button/moving_filled.svelte index aff5185..f944dce 100644 --- a/mz_v1_front/src/components/button/moving_filled.svelte +++ b/mz_v1_front/src/components/button/moving_filled.svelte @@ -8,12 +8,24 @@ export let name = "Do something"; export let type = "button"; export let targetPath = "/"; + export let id; + export let latest_id; + + async function handleClick() { + // id와 latest_id를 sessionStorage에 저장 + sessionStorage.setItem('id', id); + sessionStorage.setItem('latest_id', latest_id); + alert(id, latest_id); + + // targetPath로 페이지 이동 + goto(targetPath); + }