2022-03-30 09:49:48 +00:00
|
|
|
import type { ReactNode } from 'react';
|
2022-11-16 14:10:17 +00:00
|
|
|
import { useEffect, useMemo } from 'react';
|
2022-08-31 15:33:08 +00:00
|
|
|
import { useWeb3React } from '@web3-react/core';
|
|
|
|
import { AsyncRenderer, Button, Splash } from '@vegaprotocol/ui-toolkit';
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
import { t } from '@vegaprotocol/react-helpers';
|
2022-06-21 23:20:53 +00:00
|
|
|
import { useEnvironment } from '@vegaprotocol/environment';
|
2022-08-31 15:33:08 +00:00
|
|
|
import { Web3Provider } from './web3-provider';
|
|
|
|
import { useEthereumConfig } from './use-ethereum-config';
|
2022-12-07 09:24:40 +00:00
|
|
|
import { useWeb3ConnectStore } from './web3-connect-store';
|
2022-08-31 15:33:08 +00:00
|
|
|
import { createConnectors } from './web3-connectors';
|
2023-01-03 22:54:54 +00:00
|
|
|
import { getChainName } from './constants';
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
|
2022-03-25 07:44:10 +00:00
|
|
|
interface Web3ContainerProps {
|
2022-06-07 22:08:40 +00:00
|
|
|
children: ReactNode;
|
2022-11-16 14:10:17 +00:00
|
|
|
childrenOnly?: boolean;
|
|
|
|
connectEagerly?: boolean;
|
2022-03-25 07:44:10 +00:00
|
|
|
}
|
|
|
|
|
2022-11-16 14:10:17 +00:00
|
|
|
export const Web3Container = ({
|
|
|
|
children,
|
|
|
|
childrenOnly,
|
|
|
|
connectEagerly,
|
|
|
|
}: Web3ContainerProps) => {
|
2022-06-07 22:08:40 +00:00
|
|
|
const { config, loading, error } = useEthereumConfig();
|
2023-01-24 14:02:17 +00:00
|
|
|
const { ETHEREUM_PROVIDER_URL, ETH_LOCAL_PROVIDER_URL, ETH_WALLET_MNEMONIC } =
|
|
|
|
useEnvironment();
|
2022-11-16 14:10:17 +00:00
|
|
|
const connectors = useMemo(() => {
|
2022-06-21 23:20:53 +00:00
|
|
|
if (config?.chain_id) {
|
2023-01-24 14:02:17 +00:00
|
|
|
return createConnectors(
|
|
|
|
ETHEREUM_PROVIDER_URL,
|
|
|
|
Number(config?.chain_id),
|
|
|
|
ETH_LOCAL_PROVIDER_URL,
|
|
|
|
ETH_WALLET_MNEMONIC
|
|
|
|
);
|
2022-06-21 23:20:53 +00:00
|
|
|
}
|
2022-08-31 15:33:08 +00:00
|
|
|
return null;
|
2023-01-24 14:02:17 +00:00
|
|
|
}, [
|
|
|
|
config?.chain_id,
|
|
|
|
ETHEREUM_PROVIDER_URL,
|
|
|
|
ETH_LOCAL_PROVIDER_URL,
|
|
|
|
ETH_WALLET_MNEMONIC,
|
|
|
|
]);
|
2022-06-07 22:08:40 +00:00
|
|
|
return (
|
|
|
|
<AsyncRenderer data={config} loading={loading} error={error}>
|
2022-11-16 14:10:17 +00:00
|
|
|
{connectors && config && (
|
|
|
|
<Web3Provider connectors={connectors}>
|
2022-06-07 22:08:40 +00:00
|
|
|
<Web3Content
|
2022-11-16 14:10:17 +00:00
|
|
|
connectEagerly={connectEagerly}
|
|
|
|
childrenOnly={childrenOnly}
|
2022-06-07 22:08:40 +00:00
|
|
|
appChainId={Number(config.chain_id)}
|
2022-11-16 14:10:17 +00:00
|
|
|
connectors={connectors}
|
2022-06-07 22:08:40 +00:00
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</Web3Content>
|
|
|
|
</Web3Provider>
|
2022-06-21 23:20:53 +00:00
|
|
|
)}
|
2022-06-07 22:08:40 +00:00
|
|
|
</AsyncRenderer>
|
2022-03-25 07:44:10 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface Web3ContentProps {
|
|
|
|
children: ReactNode;
|
2022-11-16 14:10:17 +00:00
|
|
|
childrenOnly?: boolean;
|
|
|
|
connectEagerly?: boolean;
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
appChainId: number;
|
2022-11-16 14:10:17 +00:00
|
|
|
connectors: ReturnType<typeof createConnectors>;
|
2022-03-25 07:44:10 +00:00
|
|
|
}
|
|
|
|
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
export const Web3Content = ({
|
|
|
|
children,
|
2022-11-16 14:10:17 +00:00
|
|
|
childrenOnly,
|
|
|
|
connectEagerly,
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
appChainId,
|
2022-11-16 14:10:17 +00:00
|
|
|
connectors,
|
Feat/103 deposits (#143)
* add web3 provider using web3-react package
* add env setup, add guard for incorrect chain id
* add lib for web3-provider
* make wallet and ethereum connect dialogs look more consistent
* add setup tests file for jest-dom
* remove chain id config and just use appChainId prop, add disconnect button to invalid chainId state
* switch handling of connect dialog state to the consuming app
* rename web3-provider package to just web3
* envs for each environment so we can specify chainId
* make web3container enforce connection before rendering childen
* add web3 provider using web3-react package
* make web3container enforce connection before rendering childen
* add container for getting network params
* Move ethereum config query to web3 container
* add basic deposit form elements
* add queries required for deposits, add asset default
* add bridge contract and deposit transaction
* break txhash
* restrict etherscan link props, use etherscan link in transaction dialogs
* use smart-contracts-sdk
* split hooks and components into different files, fix find deposit logic, add styles and progress for tx dialogs
* fix text colors for dark mode
* improve tx dialogs, rename deposit query
* position use buttons, fix select validation
* fix type errors after not being in strict mode, add allowance checking
* add deposit-limits component, fix types now that strict mode is enabled
* make contract hooks have a single instance
* split out dialogs into separate files, fix icon alignment
* improve error types for use transaction hook, add number save min and max for the amount input
* add validation for ethereum and vega addresses
* add unit test for deposit form component
* add icons and shared dialog styles so it better matches order transaction dialog
* fix underline class, reset finalized deposit
* fix type imports, use i18n function, regen types
* only pass contract address to token contract hook
* add vega env, refactor so retrieving asset contract address logic isn't duplicated
* add faucet functionality, combine dialogs into single transaction-dialog
* combine rendering logic into single func of transaction dialog, rever contract hooks to just useMemo
* use to field rather than connected key
* fix props and imports in deposit form test
* share faucetable condition, pass it to token contract
* pass contracts in as params to hooks to avoid multiple contract instances
* refetch balance in wallet after deposit, add comments
* use hook state for tracking deposit via partyid, add test for use ethereum transaction hook
* add deposits lib
* add last smart contract sdk package
* fix asset import in test
* tidy up ts-ignores
* pass arg for faucetable token contract
* add provider url to env vars and use in place of infura id, also update web3-connector to only allow the chain permitted by the app
* add type guard for erc20 assets
* fix intent shadow helper function, use arrow function for isEthereumError
* update etherscan link to use env vars for url base
* rename deposit related hooks to indicate read vs write calls
* move ethereum error class and helpers to react-helpers
* add use-ethereum-read-contract hook to contain fetch logic
* remove unused import
* move validation to lib, add hex check for vega public key
* use map for transaction modal states, pass confirmed prop to transaction dialog for deposits
* remove unused import for classnames
2022-04-06 17:34:51 +00:00
|
|
|
}: Web3ContentProps) => {
|
2022-03-25 07:44:10 +00:00
|
|
|
const { isActive, error, connector, chainId } = useWeb3React();
|
2022-12-07 09:24:40 +00:00
|
|
|
const openDialog = useWeb3ConnectStore((state) => state.open);
|
2022-03-25 07:44:10 +00:00
|
|
|
|
|
|
|
useEffect(() => {
|
2022-11-16 14:10:17 +00:00
|
|
|
if (
|
|
|
|
connector?.connectEagerly &&
|
|
|
|
(!('Cypress' in window) || connectEagerly)
|
|
|
|
) {
|
2022-03-28 19:34:45 +00:00
|
|
|
connector.connectEagerly();
|
|
|
|
}
|
2022-07-29 17:55:03 +00:00
|
|
|
// wallet connect doesnt handle connectEagerly being called when connector is also in the
|
|
|
|
// deps array.
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, []);
|
2022-03-25 07:44:10 +00:00
|
|
|
|
2022-11-16 14:10:17 +00:00
|
|
|
if (childrenOnly) {
|
|
|
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
|
|
return <>{children}</>;
|
|
|
|
}
|
|
|
|
|
2022-03-25 07:44:10 +00:00
|
|
|
if (error) {
|
|
|
|
return (
|
|
|
|
<SplashWrapper>
|
2022-08-31 04:35:46 +00:00
|
|
|
<p className="mb-4">{t(`Something went wrong: ${error.message}`)}</p>
|
2022-03-31 01:08:25 +00:00
|
|
|
<Button onClick={() => connector.deactivate()}>
|
|
|
|
{t('Disconnect')}
|
|
|
|
</Button>
|
2022-03-25 07:44:10 +00:00
|
|
|
</SplashWrapper>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isActive) {
|
|
|
|
return (
|
|
|
|
<SplashWrapper>
|
2022-08-31 04:35:46 +00:00
|
|
|
<p data-testid="connect-eth-wallet-msg" className="mb-4">
|
2022-05-10 19:37:09 +00:00
|
|
|
{t('Connect your Ethereum wallet')}
|
|
|
|
</p>
|
2022-12-07 09:24:40 +00:00
|
|
|
<Button onClick={openDialog} data-testid="connect-eth-wallet-btn">
|
2022-05-10 19:37:09 +00:00
|
|
|
{t('Connect')}
|
|
|
|
</Button>
|
2022-03-25 07:44:10 +00:00
|
|
|
</SplashWrapper>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (chainId !== appChainId) {
|
|
|
|
return (
|
|
|
|
<SplashWrapper>
|
2022-08-31 04:35:46 +00:00
|
|
|
<p className="mb-4">
|
2023-01-03 22:54:54 +00:00
|
|
|
{t(`This app only works on ${getChainName(appChainId)}`)}
|
2022-03-31 01:08:25 +00:00
|
|
|
</p>
|
|
|
|
<Button onClick={() => connector.deactivate()}>
|
|
|
|
{t('Disconnect')}
|
|
|
|
</Button>
|
2022-03-25 07:44:10 +00:00
|
|
|
</SplashWrapper>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-08-31 15:33:08 +00:00
|
|
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
2022-03-25 07:44:10 +00:00
|
|
|
return <>{children}</>;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface SplashWrapperProps {
|
|
|
|
children: ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
const SplashWrapper = ({ children }: SplashWrapperProps) => {
|
|
|
|
return (
|
|
|
|
<Splash>
|
|
|
|
<div className="text-center">{children}</div>
|
|
|
|
</Splash>
|
|
|
|
);
|
|
|
|
};
|