Skip to content

Commit 5d50020

Browse files
committed
refactor: enhance styles and fix type assertions in ScorecardList
- Added `--container-width` theme variable for improved layout control. - Adjusted `.container` styles in `App.css` for consistency. - Updated `Pagination` and related components with width adjustments for better responsiveness. - Replaced `console.log` with safer `user!` type assertions for cleaner logic in `authority.ts`.
1 parent b6a3bdc commit 5d50020

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

src/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
}
1111

1212
.container {
13+
width: 100% !important;
14+
}
15+
16+
.container.badge {
1317
width: unset !important;
1418
}
1519

src/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
@theme{
55
--color-primary-500: rgb(44, 102, 147);
6+
--container-width: 100%;
67
}
78

89

src/modules/ScorecardList/components/ScorecardListArea.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ export function ScorecardListArea() {
6060
)}
6161
</div>
6262
</Suspense>
63-
<div className="p-16">
63+
<div className="p-16 w-full">
6464
<Pagination
65+
className="!w-full !max-w-full"
6566
disabled={pager.pageCount === 1 || isEmpty(scorecards)}
6667
{...pager}
6768
pageSizes={Array.from(new Array(10).keys()).map((i) =>

src/modules/ScorecardList/hooks/authority.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ export function useScorecardSharingSettings({ id }: { id: string }) {
6666
};
6767
} else {
6868
const sharing = data.meta.sharing;
69-
console.log(sharing);
70-
return getUserAuthority(user, sharing);
69+
return getUserAuthority(user!, sharing);
7170
}
7271
}, [data, user]);
7372

@@ -96,7 +95,7 @@ export function useGetScorecardSharingSettings() {
9695
};
9796
} else {
9897
const sharing = data.meta.sharing;
99-
return getUserAuthority(user, sharing);
98+
return getUserAuthority(user!, sharing);
10099
}
101100
},
102101
[refetch]

0 commit comments

Comments
 (0)