Skip to content

Commit

Permalink
APi useg progress yracker colour added button colour fixed API fully…
Browse files Browse the repository at this point in the history
… confifured
  • Loading branch information
SwarnenduG07 committed Jul 26, 2024
1 parent 16a82a9 commit 257e2a1
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 23 deletions.
1 change: 0 additions & 1 deletion app/(dashboard)/(routes)/code/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const Codepage = () => {
/>
<Button className="col-span-3 lg:col-span-2 w-full"
disabled={isLoading}
variant="premium"
>
Genarate
</Button>
Expand Down
1 change: 0 additions & 1 deletion app/(dashboard)/(routes)/conversation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const ConversationPage = () => {
/>
<Button className="col-span-3 lg:col-span-2 w-full"
disabled={isLoading}
variant="premium"
>
Genarate
</Button>
Expand Down
12 changes: 0 additions & 12 deletions app/(dashboard)/(routes)/image/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ export const amountOptions = [
value: "1",
lable:"1 Photo"
},
{
value: "2",
lable: "2 Photo"
},
{
value: "3",
lable:"3 photos"
},
{
value: "4",
lable:"4 photos"
}
]

export const resolutionOptions =[
Expand Down
7 changes: 3 additions & 4 deletions app/(dashboard)/(routes)/image/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Music = () => {
if (e?.response?.status === 403) {
proModel.onOpen();
} else {
toast.error("Something went wrong");
toast.error("API Cradit's are ended Plsese wait and Try after sometime");
}
} finally {
router.refresh();
Expand Down Expand Up @@ -148,8 +148,7 @@ const Music = () => {
/>
<Button className="col-span-3 lg:col-span-2 w-full"
disabled={isLoading}
variant="premium"
>
>
Generate
</Button>
</form>
Expand All @@ -164,7 +163,7 @@ const Music = () => {
{images.length === 0 && !isLoading && (
<Empty label={"No Image generated"} />
)}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 mt-8">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-2 xl:ml-72 xl:pl-20 mt-10">
{images.map((src) => (
<Card key={src} className="rounded-lg overflow-hidden">
<div className="relative aspect-square">
Expand Down
1 change: 0 additions & 1 deletion app/(dashboard)/(routes)/music/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const Music = () => {
/>
<Button className="col-span-3 lg:col-span-2 w-full"
disabled={isLoading}
variant="premium"
>
Genarate
</Button>
Expand Down
1 change: 0 additions & 1 deletion app/(dashboard)/(routes)/video/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const Videopage = () => {
/>
<Button className="col-span-3 lg:col-span-2 w-full"
disabled={isLoading}
variant="premium"
>
Genarate
</Button>
Expand Down
4 changes: 3 additions & 1 deletion app/api/image/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export async function POST(req: Request, res: Response) {
const buffer = Buffer.from(arrayBuffer);
const base64Image = buffer.toString('base64');


if (!isPro) {
await increseApiLimit();
}

return NextResponse.json({ image: base64Image }, {
headers: { "Content-Type": "application/json" },
Expand Down
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 248 90% 66%
--primary: 248 90% 66%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
Expand Down
2 changes: 1 addition & 1 deletion components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const buttonVariants = cva(
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
"bg-secondary text-secondary-foreground hover:bg-slate-300",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
premium: "bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white border-0",
Expand Down

0 comments on commit 257e2a1

Please sign in to comment.