Don't run thumbnail hook in browser (#5229)

* Don't run thumbnail hook in browser

* fmt
This commit is contained in:
Frank Noirot
2025-02-03 16:09:47 -05:00
committed by GitHub
parent 56d861f2cc
commit 86349375d0

View File

@ -104,7 +104,11 @@ export function App() {
// Generate thumbnail.png when loading the app
useEffect(() => {
if (!capturedCanvas && lastCommandType === 'execution-done') {
if (
isDesktop() &&
!capturedCanvas &&
lastCommandType === 'execution-done'
) {
setTimeout(() => {
const projectDirectoryWithoutEndingSlash = loaderData?.project?.path
if (!projectDirectoryWithoutEndingSlash) {