Skip to content

Commit

Permalink
fix: json view for applications (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
negar-abbasi authored Jun 17, 2024
1 parent 6d44abf commit e45fc7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/features/applications/components/application-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ type Props = {
application: Application
}

const expandApplicationJsonLevel = (level: number) => {
return level < 2
}
export function ApplicationDetails({ application }: Props) {
const applicationItems = useMemo(
() => [
Expand Down Expand Up @@ -101,7 +104,7 @@ export function ApplicationDetails({ application }: Props) {
<CardContent className={cn('text-sm space-y-2')}>
<div className={cn('grid grid-cols-[1fr_max-content]')}>
<DescriptionList items={applicationItems} />
<OpenJsonViewDialogButton json={application.json} />
<OpenJsonViewDialogButton json={application.json} expandJsonLevel={expandApplicationJsonLevel} />
</div>
</CardContent>
</Card>
Expand Down

0 comments on commit e45fc7c

Please sign in to comment.