fix: unlisted-recipe share link wrongly warned it wouldn't work (v0.28.3)
The public /r/{id} route allows any visibility except "private", so
unlisted links always worked — the copy-link toast just checked for
visibility === "public" instead of !== "private", flagging unlisted
recipes as broken when they weren't.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,10 +17,10 @@ export function ShareRecipeButton({ recipeId, visibility }: { recipeId: string;
|
||||
toast.error(t("shareCopyFailed"));
|
||||
return;
|
||||
}
|
||||
if (visibility === "public") {
|
||||
toast.success(t("shareLinkCopied"));
|
||||
} else {
|
||||
if (visibility === "private") {
|
||||
toast.info(t("shareNotPublicNotice"));
|
||||
} else {
|
||||
toast.success(t("shareLinkCopied"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user