Skip to content

Commit

Permalink
fix: only show when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Sep 27, 2023
1 parent 2f3d85b commit a6532e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function ActiveIncidentsActionsColumn({
return (
<>
<Button
disabled={isDispatch ? !hasActiveDispatchers : !isUnitActive}
isDisabled={isDispatch ? !hasActiveDispatchers : !isUnitActive}
size="xs"
variant="success"
onPress={() => onEditClick(incident)}
Expand All @@ -66,7 +66,7 @@ export function ActiveIncidentsActionsColumn({
{isDispatch ? (
<Button
onPress={() => onEndClick(incident)}
disabled={!hasActiveDispatchers}
isDisabled={!hasActiveDispatchers}
size="xs"
variant="danger"
className="ml-2"
Expand All @@ -76,7 +76,7 @@ export function ActiveIncidentsActionsColumn({
) : (
<Button
className="ml-2"
disabled={!isUnitActive}
isDisabled={!isUnitActive}
size="xs"
onPress={() =>
unit &&
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src/pages/officer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function OfficerDashboard({
}));
const set911Calls = useCall911State((state) => state.setCalls);
const t = useTranslations("Leo");
const { ACTIVE_WARRANTS, CALLS_911 } = useFeatureEnabled();
const { ACTIVE_INCIDENTS, ACTIVE_WARRANTS, CALLS_911 } = useFeatureEnabled();
const { user } = useAuth();
const session = user ?? _session;

Expand Down Expand Up @@ -199,7 +199,7 @@ export default function OfficerDashboard({
},
{
type: DashboardLayoutCardType.ACTIVE_INCIDENTS,
isEnabled: true,
isEnabled: ACTIVE_INCIDENTS,
children: <ActiveIncidents />,
},
];
Expand Down

0 comments on commit a6532e6

Please sign in to comment.