fix: cleanup unused imports, restore campaigns, fix settings pagination syntax

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 16:42:04 +05:30
parent 567f9f2d72
commit 941b51731f
4 changed files with 6 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ import {
faPhoneArrowUp,
} from '@fortawesome/pro-duotone-svg-icons';
import { SearchLg } from '@untitledui/icons';
import { Table, TableCard } from '@/components/application/table/table';
import { Table } from '@/components/application/table/table';
import { Badge } from '@/components/base/badges/badges';
import { Input } from '@/components/base/input/input';
import { Tabs, TabList, Tab } from '@/components/application/tabs/tabs';

View File

@@ -1,7 +1,6 @@
import type { FC, HTMLAttributes } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faBell,
faBullhorn,
faChartMixed,
faChevronLeft,
@@ -50,9 +49,6 @@ const IconGear: FC<HTMLAttributes<HTMLOrSVGElement>> = ({ className }) => (
const IconPhone: FC<HTMLAttributes<HTMLOrSVGElement>> = ({ className }) => (
<FontAwesomeIcon icon={faPhone} className={className} />
);
const IconBell: FC<HTMLAttributes<HTMLOrSVGElement>> = ({ className }) => (
<FontAwesomeIcon icon={faBell} className={className} />
);
const IconClockRewind: FC<HTMLAttributes<HTMLOrSVGElement>> = ({ className }) => (
<FontAwesomeIcon icon={faClockRotateLeft} className={className} />
);

View File

@@ -122,7 +122,7 @@ export const CampaignsPage = () => {
iconLeading={({ className }: { className?: string }) => (
<FontAwesomeIcon icon={faPenToSquare} className={className} />
)}
onClick={(e) => {
onClick={(e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
setEditCampaign(campaign);

View File

@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faKey, faToggleOn, faToggleOff } from '@fortawesome/pro-duotone-svg-icons';
import { faKey, faToggleOn } from '@fortawesome/pro-duotone-svg-icons';
import { Avatar } from '@/components/base/avatar/avatar';
import { Badge } from '@/components/base/badges/badges';
import { Button } from '@/components/base/buttons/button';
@@ -101,7 +101,7 @@ export const SettingsPage = () => {
<div className="flex items-center justify-center py-12">
<p className="text-sm text-tertiary">Loading employees...</p>
</div>
) : (
) : (<>
<Table>
<Table.Header>
<Table.Head label="EMPLOYEE" />
@@ -166,7 +166,7 @@ export const SettingsPage = () => {
{totalPages > 1 && (
<div className="flex items-center justify-between border-t border-secondary px-5 py-3">
<span className="text-xs text-tertiary">
{(page - 1) * PAGE_SIZE + 1}{Math.min(page * PAGE_SIZE, filtered.length)} of {filtered.length}
{(page - 1) * PAGE_SIZE + 1}&ndash;{Math.min(page * PAGE_SIZE, filtered.length)} of {filtered.length}
</span>
<div className="flex items-center gap-1">
<button onClick={() => setPage(Math.max(1, page - 1))} disabled={page === 1}
@@ -176,7 +176,7 @@ export const SettingsPage = () => {
</div>
</div>
)}
)}
</> )}
</TableCard.Root>
</div>
</div>