Update
This commit is contained in:
@@ -18,7 +18,7 @@ const EditorAISheet = () => {
|
||||
const emitter = useMitt();
|
||||
const { generateMeme, isGeneratingMeme, keywords, isLoadingAIHints, fetchAIHints } = useMediaStore();
|
||||
|
||||
const { user } = useUserStore();
|
||||
const { credits } = useUserStore();
|
||||
const { auth } = usePage().props;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -66,7 +66,7 @@ const EditorAISheet = () => {
|
||||
placeholder="Make a meme for e.g. work life stress"
|
||||
value={prompt}
|
||||
onChange={(e) => setPrompt(e.target.value)}
|
||||
className="bg-muted/30 max-h-20 min-h-12 resize-none rounded-3xl border-0 p-4 text-base"
|
||||
className="bg-muted/30 max-h-20 min-h-12 resize-none rounded-3xl border-0 p-4 text-center text-base"
|
||||
/>
|
||||
|
||||
{/* AI Keywords */}
|
||||
@@ -89,6 +89,8 @@ const EditorAISheet = () => {
|
||||
</div>
|
||||
)}
|
||||
<div className={cn('space-y-2', !prompt.trim() && 'invisible')}>
|
||||
{auth.user ? (
|
||||
<>
|
||||
<Button
|
||||
onClick={handleSend}
|
||||
className={cn('w-full rounded-full')}
|
||||
@@ -110,6 +112,13 @@ const EditorAISheet = () => {
|
||||
<div className="text-muted-foreground text-center text-xs">
|
||||
A new meme costs 1 credit for AI captions & 1 credit for AI background.{' '}
|
||||
</div>
|
||||
<div className="text-muted-foreground text-center text-xs">You have {credits} credits remaining.</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div className="text-muted-foreground text-center text-xs">Login / Signup to use AI features.</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user