-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from kotalco/development
Fix Issues
- Loading branch information
Showing
12 changed files
with
111 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/app/(managed-dashboard)/(main)/billing/plan/_components/add-new-card-button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use client"; | ||
import { CreditCard } from "lucide-react"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
import { useChangeSubscriptionModal } from "@/hooks/use-change-subscription-modal"; | ||
import { delay } from "@/lib/utils"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
|
||
const AddNewCardButton = ({ children }: { children: React.ReactNode }) => { | ||
const router = useRouter(); | ||
const { onClose, setStep } = useChangeSubscriptionModal(); | ||
|
||
const handleClick = async () => { | ||
router.push("/payment-methods"); | ||
await delay(1000); | ||
onClose(); | ||
setStep(1); | ||
}; | ||
|
||
return ( | ||
<Button | ||
onClick={handleClick} | ||
type="button" | ||
variant="outline" | ||
size="sm" | ||
className="mt-4 w-full" | ||
> | ||
<CreditCard className="w-6 h-6 mr-2" /> | ||
<span>{children}</span> | ||
</Button> | ||
); | ||
}; | ||
export default AddNewCardButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
src/app/(managed-dashboard)/(main)/billing/plan/_components/invoice-payment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
src/app/(managed-dashboard)/(main)/billing/plan/_components/plan-selection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters