Skip to content

Commit

Permalink
fix: responsiveness on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
krishkalaria12 committed Jul 14, 2024
1 parent d79c44d commit daa051d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions src/app/api/expense/get-expense-by-comparison/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ export async function GET(request: Request){
const endOfPreviousMonth = new Date(today.getFullYear(), today.getMonth(), 0);
endOfPreviousMonth.setHours(23, 59, 59, 999);

// Logging the calculated dates for debugging
console.log("Start of Week:", startOfWeek);
console.log("End of Week:", endOfWeek);
console.log("Start of Past Week:", startOfPastWeek);
console.log("End of Past Week:", endOfPastWeek);
console.log("Start of Month:", startOfMonth);
console.log("End of Month:", endOfMonth);
console.log("Start of Previous Month:", startOfPreviousMonth);
console.log("End of Previous Month:", endOfPreviousMonth);

// Calculate expenses for the present week
const weekExpense = await calculateExpense(userId, startOfWeek, endOfWeek);

Expand Down Expand Up @@ -137,7 +127,6 @@ const calculateOverallExpense = async (userId: string) => {
};

const calculateExpense = async (userId: string, startDate: Date, endDate: Date) => {
console.log(`Calculating expense from ${startDate} to ${endDate}`);
const expenseAggregate = await Expense.aggregate([
{
$match: {
Expand All @@ -159,7 +148,6 @@ const calculateExpense = async (userId: string, startDate: Date, endDate: Date)
}
]);

console.log(`Expense from ${startDate} to ${endDate}:`, expenseAggregate);
return expenseAggregate.length > 0 ? expenseAggregate[0].totalExpense : 0;
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/ask-friend-for-money/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const AskFriendPage: React.FC = () => {
<p className='text-sm my-3 text-gray-400 font-normal font-mono'>
You are indebted to the user and must settle your debt by making a payment to them.
</p>
<Tabs defaultValue="pendingOwes" className="w-[90%]">
<Tabs defaultValue="pendingOwes" className="">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="pendingOwes">Pending</TabsTrigger>
<TabsTrigger value="confirmedOwes">I Paid</TabsTrigger>
Expand Down
2 changes: 1 addition & 1 deletion src/app/expense/ListExpense.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const ListExpense: React.FC<ListExpenseProps> = ({ expenses }) => {
<p className="text-center text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl">No expenses Found! Add your expense now to get started.</p>
) : (
<Tabs value={selectedCategory}>
<div className="flex items-center justify-between">
<div className="flex sm:flex-row flex-col-reverse sm:gap-y-0 gap-y-3 items-start justify-between">
<TabsList>
{expenses?.map((category) => (
<TabsTrigger key={category.category} value={category.category} onClick={() => handleCategoryChange(category.category)}>
Expand Down

0 comments on commit daa051d

Please sign in to comment.