33 | {stack.split('\n').map((line, index) => {
34 | const match = line.match(/^(.+)@(.+):(\d+):(\d+)$/);
35 |
36 | if (match) {
37 | const [, methodName, file, lineNumber, column] = match;
38 |
39 | if (file.includes('/node_modules/@react-navigation')) {
40 | return null;
41 | }
42 |
43 | return (
44 | // eslint-disable-next-line react/no-array-index-key
45 |
46 | {methodName.split('.').map((part, i, self) => {
47 | if (i === self.length - 1 && i !== 0) {
48 | return {part};
49 | }
50 |
51 | if (self.length !== 1) {
52 | return (
53 | <>
54 | {part}
55 | .
56 | >
57 | );
58 | }
59 |
60 | return part;
61 | })}{' '}
62 | (
63 | {file.split('/').pop()}
64 | :
65 | {lineNumber}:{column}
66 | )
67 |
68 | );
69 | }
70 |
71 | return (
72 | // eslint-disable-next-line react/no-array-index-key
73 | {line}
74 | );
75 | })}
76 |
77 | >
78 | ) : null}
79 |