Skip to content

Commit bb1e29e

Browse files
committed
feat: shareable presets
1 parent f76fd15 commit bb1e29e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/codeimage/src/state/presets/presets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const PresetStoreDefinition = experimental__defineResource(fetchInitialState)
142142
}),
143143
copyLink: store.asyncAction((payload: Preset) => {
144144
const data = window.btoa(JSON.stringify(payload));
145-
const link = `http://${window.location.host}?share_preset=${data}`;
145+
const link = `${window.location.origin}${window.location.pathname}?share_preset=${data}`;
146146
return navigator.clipboard.writeText(link);
147147
}),
148148
syncPreset: store.asyncAction((payload: Preset) => {

0 commit comments

Comments
 (0)