Skip to content

Commit

Permalink
- Fikset visning av kildedata i Tenor komponent, grunnet manglende su…
Browse files Browse the repository at this point in the history
…spense handling (#3711)
  • Loading branch information
stigus authored Jan 6, 2025
1 parent 4bf6d6c commit 3ab8b8e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Tabs } from '@navikt/ds-react'
import React, { lazy } from 'react'
import React, { lazy, Suspense } from 'react'
import styled from 'styled-components'
import { FileCodeIcon, KeyVerticalIcon } from '@navikt/aksel-icons'
import Loading from '@/components/ui/loading/Loading'

const TabsVisningFormatter = styled.div`
width: 100%;
Expand Down Expand Up @@ -56,7 +57,9 @@ export const TabsVisning = ({ children, kildedata }: any) => {
marginBottom: '15px',
}}
>
<PrettyCode language={'json'} codeString={kildedataPretty} wrapLongLines />
<Suspense fallback={<Loading label={'Laster kildedata...'} />}>
<PrettyCode language={'json'} codeString={kildedataPretty} wrapLongLines />
</Suspense>
</Tabs.Panel>
</Tabs>
</TabsVisningFormatter>
Expand Down

0 comments on commit 3ab8b8e

Please sign in to comment.