diff --git a/packages/concordia-app/src/App.jsx b/packages/concordia-app/src/App.jsx index 4da7d26..4e97d13 100644 --- a/packages/concordia-app/src/App.jsx +++ b/packages/concordia-app/src/App.jsx @@ -2,18 +2,18 @@ import React from 'react'; import { Provider } from 'react-redux'; import { BrowserRouter as Router } from 'react-router-dom'; import PropTypes from 'prop-types'; -import LoadingContainer from './components/LoadingContainer'; +import InitializationScreen from './components/InitializationScreen'; import Routes from './Routes'; import './intl/index'; import 'semantic-ui-css/semantic.min.css'; const App = ({ store }) => ( - + - + ); diff --git a/packages/concordia-app/src/components/LoadingComponent.jsx b/packages/concordia-app/src/components/InitializationScreen/CustomLoader/index.jsx similarity index 87% rename from packages/concordia-app/src/components/LoadingComponent.jsx rename to packages/concordia-app/src/components/InitializationScreen/CustomLoader/index.jsx index 69d41a6..99bcedf 100644 --- a/packages/concordia-app/src/components/LoadingComponent.jsx +++ b/packages/concordia-app/src/components/InitializationScreen/CustomLoader/index.jsx @@ -4,10 +4,10 @@ import PropTypes from 'prop-types'; import { Container, Progress } from 'semantic-ui-react'; // Images -import ethereumLogo from '../assets/images/ethereum_logo.svg'; -import ipfsLogo from '../assets/images/ipfs_logo.svg'; -import orbitdbLogo from '../assets/images/orbitdb_logo.svg'; -import appLogo from '../assets/images/app_logo.png'; +import ethereumLogo from '../../../assets/images/ethereum_logo.svg'; +import ipfsLogo from '../../../assets/images/ipfs_logo.svg'; +import orbitdbLogo from '../../../assets/images/orbitdb_logo.svg'; +import appLogo from '../../../assets/images/app_logo.png'; const LoadingComponent = (props) => { useEffect(() => function cleanup() { diff --git a/packages/concordia-app/src/components/LoadingContainer.jsx b/packages/concordia-app/src/components/InitializationScreen/index.jsx similarity index 89% rename from packages/concordia-app/src/components/LoadingContainer.jsx rename to packages/concordia-app/src/components/InitializationScreen/index.jsx index 0852657..82d61ce 100644 --- a/packages/concordia-app/src/components/LoadingContainer.jsx +++ b/packages/concordia-app/src/components/InitializationScreen/index.jsx @@ -1,13 +1,13 @@ import React, { Children } from 'react'; import { breezeConstants } from '@ezerous/breeze'; import { useSelector } from 'react-redux'; -import LoadingComponent from './LoadingComponent'; +import CustomLoader from './CustomLoader'; // CSS -import '../assets/css/loading-component.css'; -import { FORUM_CONTRACT } from '../constants/ContractNames'; +import '../../assets/css/loading-component.css'; +import { FORUM_CONTRACT } from '../../constants/ContractNames'; -const LoadingContainer = ({ children }) => { +const InitializationLoader = ({ children }) => { const initializing = useSelector((state) => state.drizzleStatus.initializing); const failed = useSelector((state) => state.drizzleStatus.failed); const ipfsStatus = useSelector((state) => state.ipfs.status); @@ -22,7 +22,7 @@ const LoadingContainer = ({ children }) => { if (!window.ethereum) { return ( - MetaMask, ' first.']} imageType="ethereum" @@ -34,7 +34,7 @@ const LoadingContainer = ({ children }) => { if ((web3Status === 'initializing' || !web3NetworkId) && !web3NetworkFailed) { return ( - { if (web3Status === 'failed' || web3NetworkFailed) { return ( - { if (web3Status === 'initialized' && web3AccountsFailed) { return ( - { if (initializing || (!failed && !contractInitialized && contractDeployed)) { return ( - { if (!contractDeployed) { return ( - { if (ipfsStatus === breezeConstants.STATUS_INITIALIZING) { return ( - { if (ipfsStatus === breezeConstants.STATUS_FAILED) { return ( - { ? 'If needed, please sign the transaction in MetaMask to create the databases.' : 'Please sign the transaction in MetaMask to create the databases.'; return ( - { if (orbitStatus === breezeConstants.STATUS_FAILED) { return ( - { if (!userFetched) { return ( - { return Children.only(children); }; -export default LoadingContainer; +export default InitializationLoader;