Skip to content

Commit

Permalink
fix: coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
Innocent-Akim committed Nov 26, 2024
1 parent dcee5bd commit 3269eaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslations } from 'next-intl';
export function TimesheetView({ data, loading }: { data?: GroupedTimesheet[]; loading?: boolean }) {
const t = useTranslations();

if (!data) {
if (loading || !data) {
return (
<div className="grow h-full w-full bg-[#FFFFFF] dark:bg-dark--theme flex items-center justify-center">
<p>{t('pages.timesheet.LOADING')}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,11 @@ const HeaderColumn = ({
onSort: () => void;
currentSort: SortOrder | null;
}) => (
<div className="flex gap-x-2">
<div className="flex gap-x-2" role="columnheader">
<span>{label}</span>
<button
onClick={onSort}
aria-label={`Sort ${label} column ${currentSort ? `currently ${currentSort.toLowerCase()}` : ''}`}
className="flex flex-col items-start leading-none gap-0"
>
<MdKeyboardArrowUp
Expand Down Expand Up @@ -633,7 +634,11 @@ const HeaderRow = ({
style={{ backgroundColor: bgOpacity, borderBottomColor: bg }}
className="flex items-center text-[#71717A] font-medium border-b border-t dark:border-gray-600 space-x-4 p-1 h-[60px] w-full"
>
<Checkbox onCheckedChange={() => handleSelectRowByStatusAndDate(status, date!)} className="w-5 h-5" />
<Checkbox
onCheckedChange={() => date && handleSelectRowByStatusAndDate(status, date)}
className="w-5 h-5"
disabled={!date}
/>
<div className="flex-[2]">
<HeaderColumn
label="Task"
Expand Down

0 comments on commit 3269eaa

Please sign in to comment.