From 1b0b5f2ba5195da55c9b747f3a6d817a2b8f5a94 Mon Sep 17 00:00:00 2001 From: Isaac Roberts <119639439+madebyisaacr@users.noreply.github.com> Date: Thu, 25 Jun 2026 12:25:21 -0400 Subject: [PATCH 1/2] Fix permissions handling in Unsplash --- plugins/unsplash/src/App.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/unsplash/src/App.tsx b/plugins/unsplash/src/App.tsx index 13dc41def..c8c84b8bb 100644 --- a/plugins/unsplash/src/App.tsx +++ b/plugins/unsplash/src/App.tsx @@ -22,7 +22,7 @@ const minWindowWidth = mode === "canvas" ? 260 : 600 const minColumnWidth = 100 const columnGap = 5 const sidePadding = 15 * 2 -const resizable = framer.mode === "canvas" +const resizable = mode === "canvas" void framer.showUI({ position: "top right", @@ -34,7 +34,7 @@ void framer.showUI({ }) export function App() { - const isAllowedToUpsertImage = useIsAllowedTo("addImage", "setImage") + const isAllowedToUpsertImage = useIsAllowedTo(mode === "canvas" ? "addImage" : "setImage") const [query, setQuery] = useState("") @@ -42,7 +42,6 @@ export function App() { const addRandomMutation = useMutation({ mutationFn: async (query: string) => { - const mode = framer.mode const randomPhoto = await getRandomPhoto(query) if (mode === "canvas") { @@ -83,7 +82,7 @@ export function App() { - +