mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* basic login button implementation * refactoring and add dynamic auth button to the other pages * connect wallet without authenticating an user * login and logout user in blockscout account * refactoring and RPC overrides * authenticate user with connected wallet * add ENS to profile button * override evm chains and fix contract write with waas wallet * disconnect wallet and fix docker build * add dynamic imports to components that use web3 wallet packages * refactor user profile directory * clean up * tweaks * update pw ci script * fix "connect wallet" button behavior * handle linking email to profile with dynamic provider * fix test * async loading web3 hooks and remove dynamic loading from components that use them * fix pw tests * add account navigation in horizontal layout when auth provider is dynamic * fix address verification modal * review fixes * spelling fixes
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { HStack, Box } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import config from 'configs/app';
|
|
import RewardsButton from 'ui/rewards/RewardsButton';
|
|
import SearchBar from 'ui/snippets/searchBar/SearchBarDesktop';
|
|
import UserProfileDesktop from 'ui/snippets/user/UserProfileDesktop';
|
|
|
|
type Props = {
|
|
renderSearchBar?: () => React.ReactNode;
|
|
};
|
|
|
|
const HeaderDesktop = ({ renderSearchBar }: Props) => {
|
|
|
|
const searchBar = renderSearchBar ? renderSearchBar() : <SearchBar/>;
|
|
|
|
return (
|
|
<HStack
|
|
as="header"
|
|
display={{ base: 'none', lg: 'flex' }}
|
|
width="100%"
|
|
alignItems="center"
|
|
justifyContent="center"
|
|
gap={ 6 }
|
|
>
|
|
<Box width="100%">
|
|
{ searchBar }
|
|
</Box>
|
|
{ config.UI.navigation.layout === 'vertical' && (
|
|
<Box display="flex" gap={ 2 } flexShrink={ 0 }>
|
|
{ config.features.rewards.isEnabled && <RewardsButton/> }
|
|
<UserProfileDesktop buttonVariant="header"/>
|
|
</Box>
|
|
) }
|
|
</HStack>
|
|
);
|
|
};
|
|
|
|
export default React.memo(HeaderDesktop);
|