pussy-ts/src/containers/market/actionBarContainer.tsx

import { Link } from 'react-router-dom';
import { Pane, ActionBar } from '@cybercongress/gravity';
import ActionBarContainer from '../Search/ActionBarContainer';
import { trimString } from '../../utils/utils';
import { useDevice } from 'src/contexts/device';
import { AccountValue } from 'src/types/defaultAccount';

type Props = {
  addressActive: AccountValue | null;

  keywordHash: string;
  updateFunc: any;
  rankLink: string | null;
  textBtn: string;
};

function ActionBarCont({
  addressActive,
  keywordHash,
  updateFunc,
  rankLink,
  textBtn,
}: Props) {
  const { isMobile: mobile } = useDevice();

  if (!mobile && addressActive) {
    if (addressActive.keys !== 'read-only') {
      return (
        <ActionBarContainer
          keywordHash={keywordHash}
          update={updateFunc}
          rankLink={rankLink}
          textBtn={textBtn}
        />
      );
    }
    return (
      <ActionBar>
        <Pane fontSize="18px">
          this {trimString(addressActive.bech32, 8, 6)} cyber address is
          read-only
        </Pane>
      </ActionBar>
    );
  }

  return (
    <ActionBar>
      <Pane fontSize="18px">
        add cyber address in your <Link to="/">pocket</Link>
      </Pane>
    </ActionBar>
  );
}

export default ActionBarCont;

Synonyms

pussy-ts/src/containers/Search/ActionBarContainer.tsx
cyb/src/containers/Search/ActionBarContainer.tsx
pussy-ts/src/containers/Validators/ActionBarContainer.tsx
cyb/src/containers/market/actionBarContainer.tsx
cyb/src/pages/Sphere/pages/components/ActionBarContainer/ActionBarContainer.tsx

Neighbours