Showing AI reviews for website
Project AI Score ?
71%
Quality Avg ?
72%
Security Avg ?
74%
Reviews ?
123

Review Result ?

solutionbowl/website · 69dbad53
The commit adds formatting for numeric values (stakes, returns, balances, etc.) across multiple components, improving UI consistency and readability. The commit message is vague and does not clearly describe the changes. There are multiple instances of formatting numbers to fixed decimal places, which is good for user display but could have been abstracted to a helper function for better maintainability. There is no apparent security impact or bug risk introduced. However, the commit message and intent could be clearer.
Quality ?
80%
Security ?
90%
Business Value ?
70%
Maintainability ?
80%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Vague Commit Message
Where commit message
Issue / Evidence vague commit message
Suggested Fix make the commit message more descriptive of what numeric formatting and UI changes were done
Duplicate Logic
Where src/components/SportBet/SportBet.tsx:113
Issue / Evidence repeated toFixed(2) formatting
Suggested Fix consider creating a helper function to format numbers consistently
Duplicate Logic
Where src/components/SportBet/SportBet.tsx:153
Issue / Evidence repeated toFixed(2) formatting
Suggested Fix consider refactoring number formatting into a utility
Duplicate Logic
Where src/components/bets/BetSlipDrawer.tsx:200
Issue / Evidence repeated toFixed(2) formatting
Suggested Fix centralize number formatting for consistency and easier updates
Inconsistent Tofixed(0) Usage
Where src/components/betslip/BetslipFooter.tsx:37
Issue / Evidence inconsistent toFixed(0) usage
Suggested Fix decide on formatting precision and apply uniformly
Direct Number Formatting In Jsx
Where src/components/transactions/TransactionCard.tsx:160
Issue / Evidence direct number formatting in JSX
Suggested Fix abstract formatting logic to improve maintainability
Code Change Preview · src/components/bets/BetSlipDrawer.tsx ?
Removed / Before Commit
- diff --git a/src/components/bets/BetSlipDrawer.tsx b/src/components/bets/BetSlipDrawer.tsx
- index 827e1aa..62bfba3 100644
- <div className="flex justify-between text-[12px]">
- <span style={{ color: colors.textSecondary }}>Total Amount</span>
- <span style={{ color: colors.textPrimary }} className="font-semibold">
-                       ₹{totalStake.toFixed(2)}
- </span>
- </div>
- <div className="flex justify-between text-[12px]">
- <span style={{ color: colors.textSecondary }}>Potential Win</span>
- <span style={{ color: colors.primary }} className="font-semibold">
-                       ₹{potentialWinnings.toFixed(2)}
- </span>
- </div>
- </div>
- <div className="flex justify-between text-[12px]">
- <span style={{ color: colors.textSecondary }}>Total Amount</span>
- <span style={{ color: colors.textPrimary }} className="font-semibold">
Added / After Commit
+ diff --git a/src/components/bets/BetSlipDrawer.tsx b/src/components/bets/BetSlipDrawer.tsx
+ index 827e1aa..62bfba3 100644
+ <div className="flex justify-between text-[12px]">
+ <span style={{ color: colors.textSecondary }}>Total Amount</span>
+ <span style={{ color: colors.textPrimary }} className="font-semibold">
+                       {totalStake.toFixed(2)}
+ </span>
+ </div>
+ <div className="flex justify-between text-[12px]">
+ <span style={{ color: colors.textSecondary }}>Potential Win</span>
+ <span style={{ color: colors.primary }} className="font-semibold">
+                       {potentialWinnings.toFixed(2)}
+ </span>
+ </div>
+ </div>
+ <div className="flex justify-between text-[12px]">
+ <span style={{ color: colors.textSecondary }}>Total Amount</span>
+ <span style={{ color: colors.textPrimary }} className="font-semibold">
Removed / Before Commit
- diff --git a/src/components/bets/RightSidebar.tsx b/src/components/bets/RightSidebar.tsx
- index ca19012..a5b087d 100644
- <div className="flex justify-between text-[14px]">
- <span style={{ color: colors.textSecondary }}>Total Amount</span>
- <span style={{ color: colors.textPrimary }} className="font-semibold">
-                 ₹{totalStake.toFixed(2)}
- </span>
- </div>
- <div className="flex justify-between text-[14px]">
- <span style={{ color: colors.textSecondary }}>Potential Win</span>
- <span style={{ color: '#0a54ff' }} className="font-semibold">
-                 ₹{potentialWinnings.toFixed(2)}
- </span>
- </div>
- </div>
Added / After Commit
+ diff --git a/src/components/bets/RightSidebar.tsx b/src/components/bets/RightSidebar.tsx
+ index ca19012..a5b087d 100644
+ <div className="flex justify-between text-[14px]">
+ <span style={{ color: colors.textSecondary }}>Total Amount</span>
+ <span style={{ color: colors.textPrimary }} className="font-semibold">
+                 {totalStake.toFixed(2)}
+ </span>
+ </div>
+ <div className="flex justify-between text-[14px]">
+ <span style={{ color: colors.textSecondary }}>Potential Win</span>
+ <span style={{ color: '#0a54ff' }} className="font-semibold">
+                 {potentialWinnings.toFixed(2)}
+ </span>
+ </div>
+ </div>
Removed / Before Commit
- diff --git a/src/components/betslip/BetslipFooter.tsx b/src/components/betslip/BetslipFooter.tsx
- index 922adb5..81416b8 100644
- {/* Quick Amount Buttons */}
- <div className="grid grid-cols-4 gap-2 mb-3">
- <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
-           +₹100
- </button>
- <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
-           +₹500
- </button>
- <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
-           +₹1K
- </button>
- <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
-           +₹1.5K
- </button>
- </div>
- 
Added / After Commit
+ diff --git a/src/components/betslip/BetslipFooter.tsx b/src/components/betslip/BetslipFooter.tsx
+ index 922adb5..81416b8 100644
+ {/* Quick Amount Buttons */}
+ <div className="grid grid-cols-4 gap-2 mb-3">
+ <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
+           +100
+ </button>
+ <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
+           +500
+ </button>
+ <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
+           +1K
+ </button>
+ <button style={{ backgroundColor: colors.card, color: colors.textPrimary }} className="text-xs py-2 rounded hover:opacity-80">
+           +1.5K
+ </button>
+ </div>
+ 
Removed / Before Commit
- diff --git a/src/components/betslip/BetslipItem.tsx b/src/components/betslip/BetslipItem.tsx
- index 136a40e..b6cf4f2 100644
- 
- <div className="flex justify-between mt-[6px] px-[2px]">
- <span className="text-[11px] text-gray-600">Potential win</span>
-         <span className="text-[11px] text-green-400 font-semibold">₹{potentialWin}</span>
- </div>
- </div>
- );
Added / After Commit
+ diff --git a/src/components/betslip/BetslipItem.tsx b/src/components/betslip/BetslipItem.tsx
+ index 136a40e..b6cf4f2 100644
+ 
+ <div className="flex justify-between mt-[6px] px-[2px]">
+ <span className="text-[11px] text-gray-600">Potential win</span>
+         <span className="text-[11px] text-green-400 font-semibold">{potentialWin}</span>
+ </div>
+ </div>
+ );
Removed / Before Commit
- diff --git a/src/components/profile/BalanceCard.tsx b/src/components/profile/BalanceCard.tsx
- index 9fcece1..9beea0e 100644
- <div>
- <p className="text-gray-400 text-[12px]">Balance</p>
- <p style={{ color: colors.primary }} className="text-[18px] font-bold">
-           ₹{balance.toFixed(2)}
- </p>
- </div>
Added / After Commit
+ diff --git a/src/components/profile/BalanceCard.tsx b/src/components/profile/BalanceCard.tsx
+ index 9fcece1..9beea0e 100644
+ <div>
+ <p className="text-gray-400 text-[12px]">Balance</p>
+ <p style={{ color: colors.primary }} className="text-[18px] font-bold">
+           {balance.toFixed(2)}
+ </p>
+ </div>
Removed / Before Commit
- diff --git a/src/components/profile/ProfileInfo.tsx b/src/components/profile/ProfileInfo.tsx
- index a4c8596..861541c 100644
- <div className="bg-[#2A2A2A] rounded-[10px] px-[14px] py-[12px] mb-[20px] flex items-center justify-between">
- <div>
- <p className="text-gray-400 text-[12px]">Balance</p>
-                     <p style={{ color: colors.primary }} className="text-[18px] font-bold">₹{balance.toFixed(2)}</p>
- </div>
- <div style={{ backgroundColor: colors.primary }} className="bg-[#ffd700] text-black p-[8px] rounded-[8px]">
- <i className="fa-solid fa-wallet text-[16px] text-white"></i>
Added / After Commit
+ diff --git a/src/components/profile/ProfileInfo.tsx b/src/components/profile/ProfileInfo.tsx
+ index a4c8596..861541c 100644
+ <div className="bg-[#2A2A2A] rounded-[10px] px-[14px] py-[12px] mb-[20px] flex items-center justify-between">
+ <div>
+ <p className="text-gray-400 text-[12px]">Balance</p>
+                     <p style={{ color: colors.primary }} className="text-[18px] font-bold">{balance.toFixed(2)}</p>
+ </div>
+ <div style={{ backgroundColor: colors.primary }} className="bg-[#ffd700] text-black p-[8px] rounded-[8px]">
+ <i className="fa-solid fa-wallet text-[16px] text-white"></i>
Removed / Before Commit
- diff --git a/src/components/racing/HorseRow.tsx b/src/components/racing/HorseRow.tsx
- index 5cb27dc..afeac9f 100644
- ? 'Dead Heat'
- : isFancyMarket
- ? horseData.name
-       : `${horseData.horse_number} ${horseData.gateNo ? `(${horseData.gateNo}) ` : ''}${horseData.name}`
- 
- const bets = useBetStore((state) => state.bets)
- const isPlacingBet = useBetStore((state) => state.isPlacingBet)
Added / After Commit
+ diff --git a/src/components/racing/HorseRow.tsx b/src/components/racing/HorseRow.tsx
+ index 5cb27dc..afeac9f 100644
+ ? 'Dead Heat'
+ : isFancyMarket
+ ? horseData.name
+       : `${horseData.horse_number}. ${horseData.name} ${horseData.gateNo ? `(${horseData.gateNo}) ` : ''}`
+ 
+ const bets = useBetStore((state) => state.bets)
+ const isPlacingBet = useBetStore((state) => state.isPlacingBet)
Removed / Before Commit
- diff --git a/src/components/SportBet/SportBet.tsx b/src/components/SportBet/SportBet.tsx
- index e5691e8..5dc6f66 100644
- inputMode="decimal"
- value={bet.stake || ""}
- onChange={(e) => updateStake(bet.id, Number(e.target.value) || 0)}
-                   placeholder="₹ - Stake"
- className="w-[140px] p-2 text-[13px] font-bold outline-none border rounded-md focus:border-blue-500"
- style={{
- color: colors.textPrimary,
- >
- <span>Stake (per bet)</span>
- <span className="shrink-0 text-right text-[14px] font-bold" style={{ color: colors.success }}>
-                 Return: ₹{totalReturn.toFixed(2)}
- </span>
- </label>
- <input
- <div className="flex items-center justify-between text-[12px]">
- <span style={{ color: colors.textSecondary }}>Total Stake</span>
Added / After Commit
+ diff --git a/src/components/SportBet/SportBet.tsx b/src/components/SportBet/SportBet.tsx
+ index e5691e8..5dc6f66 100644
+ inputMode="decimal"
+ value={bet.stake || ""}
+ onChange={(e) => updateStake(bet.id, Number(e.target.value) || 0)}
+                   placeholder="- Stake"
+ className="w-[140px] p-2 text-[13px] font-bold outline-none border rounded-md focus:border-blue-500"
+ style={{
+ color: colors.textPrimary,
+ >
+ <span>Stake (per bet)</span>
+ <span className="shrink-0 text-right text-[14px] font-bold" style={{ color: colors.success }}>
+                 Return: {totalReturn.toFixed(2)}
+ </span>
+ </label>
+ <input
+ <div className="flex items-center justify-between text-[12px]">
+ <span style={{ color: colors.textSecondary }}>Total Stake</span>
Removed / Before Commit
- diff --git a/src/components/transactions/TransactionCard.tsx b/src/components/transactions/TransactionCard.tsx
- index fc690b9..593759a 100644
- <div className="grid grid-cols-3 gap-[6px]">
- <div>
- <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Stake</div>
-               <div className="text-[11px] font-semibold" style={{ color: colors.textPrimary }}>₹{Number(row.stake || 0).toFixed(2)}</div>
- </div>
- <div>
- <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Legs</div>
- </div>
- <div>
- <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Payout</div>
-               <div className="text-[11px] font-semibold text-green-400">₹{Number(row.potential_payout || 0).toFixed(2)}</div>
- </div>
- </div>
- </div>
- <div className="grid grid-cols-2 gap-[6px]">
- <div>
Added / After Commit
+ diff --git a/src/components/transactions/TransactionCard.tsx b/src/components/transactions/TransactionCard.tsx
+ index fc690b9..593759a 100644
+ <div className="grid grid-cols-3 gap-[6px]">
+ <div>
+ <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Stake</div>
+               <div className="text-[11px] font-semibold" style={{ color: colors.textPrimary }}>{Number(row.stake || 0).toFixed(2)}</div>
+ </div>
+ <div>
+ <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Legs</div>
+ </div>
+ <div>
+ <div className="text-[9px] mb-[1px]" style={{ color: colors.textSecondary }}>Payout</div>
+               <div className="text-[11px] font-semibold text-green-400">{Number(row.potential_payout || 0).toFixed(2)}</div>
+ </div>
+ </div>
+ </div>
+ <div className="grid grid-cols-2 gap-[6px]">
+ <div>
Removed / Before Commit
- diff --git a/src/pages/MultiRaceDetail.tsx b/src/pages/MultiRaceDetail.tsx
- index 8eeeeb8..47e7cee 100644
- userSelect: "none",
- }}
- >
-                                       {exposureValue >= 0 ? "+" : ""}₹
- {exposureValue.toFixed(2)}
- </span>
- )}
Added / After Commit
+ diff --git a/src/pages/MultiRaceDetail.tsx b/src/pages/MultiRaceDetail.tsx
+ index 8eeeeb8..47e7cee 100644
+ userSelect: "none",
+ }}
+ >
+                                       {exposureValue >= 0 ? "+" : ""}
+ {exposureValue.toFixed(2)}
+ </span>
+ )}