Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
iethree committed Jan 8, 2025
1 parent 5bc6f1c commit ab77015
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/components/CreateGithubIssue.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ describe('CreateGithubIssue', () => {
description: 'Test description',
},
entityInfo: {
name: 'Test Entity',
entityName: 'Test Entity',
}
},
}

beforeEach(() => {
Expand Down Expand Up @@ -80,7 +81,8 @@ describe('CreateGithubIssue', () => {
},
entityInfo: {
entityName: '',
}
name: '',
},
}

render(<CreateGithubIssue diagnosticData={minimalData} />)
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateGithubIssue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { DiagnosticData } from '@/types/DiagnosticData'

import { Button } from './ui/button'
interface CreateGithubIssueProps {
diagnosticData: DiagnosticData
diagnosticData: Pick<DiagnosticData, 'basicInfo' | 'entityInfo'>
slackFileId?: string
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/UploadDropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UploadDropzone: React.FC<UploadDropzoneProps> = ({ onFileUpload }) => {
const diagnosticData: DiagnosticData = {
basicInfo: {
description: parsedData.description || 'No description provided',
url: parsedData.url || 'Unknown URL',
url: parsedData.url || '',
bugReportDetails: parsedData.bugReportDetails || {},
browserInfo: parsedData.browserInfo || {},
},
Expand Down
6 changes: 4 additions & 2 deletions src/types/DiagnosticData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ export interface DiagnosticData {
basicInfo: {
url: string
description?: string
bugReportDetails: Record<string, any>
browserInfo: Record<string, any>
bugReportDetails?: Record<string, any>
browserInfo?: Record<string, any>
'metabase-info'?: Record<string, any>
'system-info'?: Record<string, any>
},
entityInfo: {
entityName: string
Expand Down

0 comments on commit ab77015

Please sign in to comment.