@campxdev/shared 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -2,7 +2,7 @@ import {ErrorBoundary as ReactErrorBoundary} from 'react-error-boundary'
2
2
  import {QueryErrorResetBoundary} from 'react-query'
3
3
  import ErrorFallback from './ErrorFallback'
4
4
 
5
- export default function PageErrorBoundary({children}) {
5
+ export default function ErrorBoundary({children}) {
6
6
  return (
7
7
  <QueryErrorResetBoundary>
8
8
  {({reset}) => (
@@ -1 +1 @@
1
- export {default} from './ErrorFallback'
1
+ export {default} from './ErrorBoundary'
@@ -25,6 +25,9 @@ export default function UserBox({
25
25
  width: '32px',
26
26
  objectFit: 'contain',
27
27
  }}
28
+ onError={(e: any) => {
29
+ e.target.src = avatarImage
30
+ }}
28
31
  />
29
32
  <Typography variant='h6'>{username}</Typography>
30
33
  </StyledUser>
@@ -1,18 +1,18 @@
1
- import { CircularProgress } from '@mui/material'
1
+ import {CircularProgress} from '@mui/material'
2
2
 
3
- function Spinner() {
4
- return (
5
- <div
6
- style={{
7
- justifyContent: 'center',
8
- alignItems: 'center',
9
- height: '200px',
10
- display: 'flex',
11
- }}
12
- >
13
- <CircularProgress />
14
- </div>
15
- )
3
+ function Spinner({height = '200px'}: {height?: string | number}) {
4
+ return (
5
+ <div
6
+ style={{
7
+ justifyContent: 'center',
8
+ alignItems: 'center',
9
+ height,
10
+ display: 'flex',
11
+ }}
12
+ >
13
+ <CircularProgress />
14
+ </div>
15
+ )
16
16
  }
17
17
 
18
18
  export default Spinner