Skip to content

Commit

Permalink
fix(types): address type issues from build
Browse files Browse the repository at this point in the history
  • Loading branch information
benforshey committed Sep 19, 2024
1 parent cf19c48 commit 1fbc884
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions packages/app/components/document/document-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import styles from './document-header.module.css'
import DocumentStateBadge from './document-state-badge'

type PropsType = {
activePanel: string
document: Document
isJsonPanelOpen: boolean
model: ModelWithWorkflow
version: any
toggleJsonDiffer: () => void
togglePanelOpen: (panel: string) => void
privileges: string[]
comments: DocumentComment[]
history: DocumentHistory[]
collaborators: Collaborator[]
activePanel?: string
document?: Document
isJsonPanelOpen?: boolean
model?: ModelWithWorkflow
version?: any
toggleJsonDiffer?: () => void
togglePanelOpen?: (panel: string) => void
privileges?: string[]
comments?: DocumentComment[]
history?: DocumentHistory[]
collaborators?: Collaborator[]
}

const DocumentHeader = ({
Expand All @@ -33,8 +33,8 @@ const DocumentHeader = ({
isJsonPanelOpen = false,
model,
version = null,
toggleJsonDiffer,
togglePanelOpen,
toggleJsonDiffer = () => {},
togglePanelOpen = () => {},
privileges = [],
comments = [],
history = [],
Expand Down
2 changes: 1 addition & 1 deletion packages/app/pages/[modelName]/[documentTitle]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ const EditDocumentPage = ({
refreshDataInPlace(router)
}

function togglePanel(panel) {
function togglePanel(panel: string) {
setActivePanel(panel === activePanel ? null : panel)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/app/pages/[modelName]/new/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const NewDocumentPage = ({ user, model }: NewDocumentPageProps) => {
<Breadcrumb title="New" />
</Breadcrumbs>

<DocumentHeader model={model} togglePanelOpen toggleJsonDiffer />
<DocumentHeader model={model} />

<Form
model={model}
Expand Down

0 comments on commit 1fbc884

Please sign in to comment.