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); + }