Skip to content

Commit 438f085

Browse files
committed
cleanup: remove unused import, fix exhaustive check, use simplified query syntax
1 parent b10ad62 commit 438f085

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

apps/app/src/components/decisions/proposalEditor/ProposalEditor.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
import { type ProposalDataInput, parseProposalData } from '@op/common/client';
1111
import { toast } from '@op/ui/Toast';
1212
import { useRouter } from 'next/navigation';
13-
import { usePostHog } from 'posthog-js/react';
1413
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1514
import type { z } from 'zod';
1615

@@ -48,7 +47,6 @@ export function ProposalEditor({
4847
const { user } = useUser();
4948
const router = useRouter();
5049
const t = useTranslations();
51-
const posthog = usePostHog();
5250
const utils = trpc.useUtils();
5351

5452
const [showInfoModal, setShowInfoModal] = useState(false);

apps/app/src/components/decisions/proposalEditor/ProposalFormRenderer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ function renderField(
228228
}
229229

230230
default: {
231-
const _exhaustive: never = format;
232-
console.warn(`Unknown x-format "${_exhaustive}" for field "${key}"`);
231+
console.warn(`Unimplemented x-format "${format}" for field "${key}"`);
233232
return null;
234233
}
235234
}

services/api/src/routers/decision/proposals/submit.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ describe.concurrent('submitProposal', () => {
116116

117117
// Advance instance to the 'final' phase which has proposals.submit = false
118118
// (testMinimalSchema: initial = submit:true, final = submit:false)
119-
const instanceRecord = await db._query.processInstances.findFirst({
120-
where: eq(processInstances.id, instance.instance.id),
119+
const instanceRecord = await db.query.processInstances.findFirst({
120+
where: { id: instance.instance.id },
121121
});
122122

123123
if (!instanceRecord) {

0 commit comments

Comments
 (0)