-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #492 from CubeArtisan/migrations
Migrate Suspense and CardPreview
- Loading branch information
Showing
8 changed files
with
61 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
import React, { Suspense as ReactSuspense } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Spinner } from 'reactstrap'; | ||
import { CircularProgress } from '@mui/material'; | ||
|
||
const Suspense = ({ ...props }) => { | ||
const Suspense = ({ fallback, ...props }) => { | ||
if (typeof window !== 'undefined') { | ||
return <ReactSuspense {...props} />; | ||
return <ReactSuspense fallback={fallback} {...props} />; | ||
} | ||
return null; | ||
}; | ||
Suspense.propTypes = { | ||
fallback: PropTypes.node, | ||
}; | ||
Suspense.defaultProps = { | ||
fallback: <Spinner />, | ||
fallback: <CircularProgress />, | ||
}; | ||
|
||
export default Suspense; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.