Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix expense list leak to 2nd line #10

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/pages/balances/[friendId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ const FriendPage: NextPageWithUser = ({ user }) => {
<Link
href={`/balances/${friendQuery.data?.id}/expenses/${e.id}`}
key={e.id}
className="flex items-center justify-between px-2 py-2"
className="flex items-start justify-between px-2 py-2"
>
<div className="flex items-center gap-3">
<div className="flex items-center gap-3 px-1">
<div className="text-xs text-gray-500">
{format(e.expenseDate, 'MMM dd')
.split(' ')
Expand All @@ -166,7 +166,11 @@ const FriendPage: NextPageWithUser = ({ user }) => {
<CategoryIcon category={e.category} className="h-5 w-5 text-gray-400" />
</div>
<div>
{!isSettlement ? <p className="text-sm lg:text-base">{e.name}</p> : null}
{!isSettlement ? (
<p className=" max-w-[180px] truncate text-sm lg:max-w-md lg:text-base">
{e.name}
</p>
) : null}
<p
className={`flex ${isSettlement ? 'text-sm text-gray-400' : 'text-xs text-gray-500'}`}
>
Expand All @@ -181,7 +185,7 @@ const FriendPage: NextPageWithUser = ({ user }) => {
</div>
</div>
{isSettlement ? null : (
<div>
<div className="min-w-10 shrink-0">
<div
className={`text-right text-xs ${youPaid ? 'text-emerald-500' : 'text-orange-700'}`}
>
Expand Down
8 changes: 6 additions & 2 deletions src/pages/groups/[groupId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ const BalancePage: NextPageWithUser = ({ user }) => {
<CategoryIcon category={e.category} className="h-5 w-5 text-gray-400" />
</div>
<div>
{!isSettlement ? <p>{e.name}</p> : null}
{!isSettlement ? (
<p className=" max-w-[180px] truncate text-sm lg:max-w-md lg:text-base">
{e.name}
</p>
) : null}
<p
className={`flex text-center ${isSettlement ? 'text-sm text-gray-400' : 'text-xs text-gray-500'}`}
>
Expand All @@ -194,7 +198,7 @@ const BalancePage: NextPageWithUser = ({ user }) => {
</div>
</div>
{isSettlement ? null : (
<div>
<div className="min-w-10 shrink-0">
<div
className={`text-right text-xs ${youPaid ? 'text-emerald-500' : 'text-orange-600'}`}
>
Expand Down