import React from 'react' ; import { FrameHeadingRendererProps } from './' ; export function JavaScriptFrameHeadingRenderer ( { stackframe , fileDetailComponent : FileDetail , } ) { const { classname , filename , function : fn } = stackframe ; const lineNumber = stackframe . line ?. number ?? 0 ; const columnNumber = stackframe . line ?. column ?? 0 ; return ( < > at { ' ' } < FileDetail > { classname && `${ classname }.` } { fn } < /FileDetail>{' '} ( < FileDetail > { filename } { lineNumber > 0 && `:${ lineNumber }` } { lineNumber > 0 && columnNumber > 0 && `:${ columnNumber }` } < /FileDetail> ) < />); }