You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. 'use client';
  2. import React, { useState } from 'react';
  3. import PageTitle from '@/components/ui/PageTitle';
  4. import { Input, Radio, Typography } from 'antd';
  5. import Link from 'next/link';
  6. const { Text } = Typography;
  7. const Wallet: React.FC = () => {
  8. const [amount, setAmount] = useState('');
  9. const [autoRenew, setAutoRenew] = useState(false);
  10. return (
  11. <main className="flex flex-col bg-white min-h-screen">
  12. <PageTitle title="WALLET" />
  13. <div className="flex flex-col gap-y-6 mt-6 max-w-md">
  14. <div className='px-3'>
  15. {/* 1. Top Section: Title + History */}
  16. <div className="flex justify-between items-center mb-2">
  17. <p className="font-bold">Current Balance</p>
  18. <Link href="/transaction-history" className="text-blue-500 underline text-sm">
  19. Transaction History
  20. </Link>
  21. </div>
  22. {/* 2. RM Input */}
  23. <div className='flex flex-col'>
  24. <Input
  25. className="border border-blue-500 bg-blue-50 mb-3"
  26. placeholder="Enter amount in RM"
  27. type='number'
  28. value={amount}
  29. onChange={(e) => setAmount(e.target.value)}
  30. prefix="RM"
  31. size="large"
  32. />
  33. <button className='w-fit rounded-lg text-xs px-4 py-2 bg-[#369cc1] hover:bg-[#436d86] text-white shadow border-0 mb-3 ms-auto'>
  34. <span className='font-bold'>Top Up Wallet</span>
  35. </button>
  36. </div>
  37. <div className="flex items-start gap-3 px-3">
  38. <Radio
  39. checked={autoRenew}
  40. onChange={(e) => setAutoRenew(e.target.checked)}
  41. />
  42. <div>
  43. <Text strong>Auto-Renew Subscription</Text>
  44. <p className="text-xs text-gray-500">
  45. Enable monthly or yearly auto payment using wallet.
  46. </p>
  47. </div>
  48. </div>
  49. </div>
  50. {/* 4. Current Plan */}
  51. <div className='border-y-2 p-3 border-blue-700'>
  52. <p><span className='font-bold'>Current Plan:</span> <span >Premium (RM25/Month)</span> </p>
  53. </div>
  54. </div>
  55. </main>
  56. );
  57. };
  58. export default Wallet;