Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 952 Bytes
dbc8f44 d3acf1b dbc8f44 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import { useStore } from "@/app/store"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
export function BottomBar() {
const download = useStore(state => state.download)
const isGeneratingStory = useStore(state => state.isGeneratingStory)
const prompt = useStore(state => state.prompt)
const panelGenerationStatus = useStore(state => state.panelGenerationStatus)
const remainingImages = Object.values(panelGenerationStatus).reduce((acc, s) => (acc + (s ? 1 : 0)), 0)
return (
<div className={cn(
`fixed bottom-8 right-8`,
`flex flex-row`,
`animation-all duration-300 ease-in-out`,
isGeneratingStory ? `scale-0 opacity-0` : ``,
)}>
<div>
<Button onClick={download}
//disabled={!prompt?.length}
disabled
>{
remainingImages ? `${remainingImages} remaining..` : `Download`
}</Button>
</div>
</div>
)
} |