jbilcke-hf HF staff commited on
Commit
d71abf1
β€’
1 Parent(s): 4ac6ced
src/app/interface/panel/index.tsx CHANGED
@@ -30,8 +30,7 @@ export function Panel({
30
  const font = useStore(state => state.font)
31
  const preset = useStore(state => state.preset)
32
  const setGeneratingImages = useStore(state => state.setGeneratingImages)
33
- const panelGenerationStatus = useStore(state => state.panelGenerationStatus)
34
- const isLoading = panelGenerationStatus[panel] || false
35
  const panels = useStore(state => state.panels)
36
  const prompt = panels[panel] || ""
37
 
@@ -53,7 +52,6 @@ export function Panel({
53
  startTransition(async () => {
54
  // console.log("Panel prompt: "+ prompt)
55
  if (!prompt?.length) { return }
56
- if (isLoading) { return }
57
 
58
  console.log("Loading panel..")
59
 
@@ -88,7 +86,7 @@ export function Panel({
88
  return
89
  }
90
  })
91
- }, [prompt, font, width, height])
92
 
93
 
94
  const checkStatus = () => {
 
30
  const font = useStore(state => state.font)
31
  const preset = useStore(state => state.preset)
32
  const setGeneratingImages = useStore(state => state.setGeneratingImages)
33
+
 
34
  const panels = useStore(state => state.panels)
35
  const prompt = panels[panel] || ""
36
 
 
52
  startTransition(async () => {
53
  // console.log("Panel prompt: "+ prompt)
54
  if (!prompt?.length) { return }
 
55
 
56
  console.log("Loading panel..")
57
 
 
86
  return
87
  }
88
  })
89
+ }, [prompt, width, height])
90
 
91
 
92
  const checkStatus = () => {
src/app/store/index.ts CHANGED
@@ -45,6 +45,7 @@ export const useStore = create<{
45
  if (prompt === existingPrompt) { return }
46
  set({
47
  prompt,
 
48
  panels: [],
49
  captions: {},
50
  })
@@ -54,6 +55,7 @@ export const useStore = create<{
54
  if (font === existingFont) { return }
55
  set({
56
  font,
 
57
  panels: [],
58
  captions: {}
59
  })
@@ -63,6 +65,7 @@ export const useStore = create<{
63
  if (preset.label === existingPreset.label) { return }
64
  set({
65
  preset,
 
66
  panels: [],
67
  captions: {}
68
  })
 
45
  if (prompt === existingPrompt) { return }
46
  set({
47
  prompt,
48
+ layout: getRandomLayoutName(),
49
  panels: [],
50
  captions: {},
51
  })
 
55
  if (font === existingFont) { return }
56
  set({
57
  font,
58
+ layout: getRandomLayoutName(),
59
  panels: [],
60
  captions: {}
61
  })
 
65
  if (preset.label === existingPreset.label) { return }
66
  set({
67
  preset,
68
+ layout: getRandomLayoutName(),
69
  panels: [],
70
  captions: {}
71
  })