-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new header with data * layout header * Add packages * Add icons package * Change out icon in service card * Add margin bottom * Convert cards * size tweaks * Fix name length issue * Convert app.js file * convert to div * remove unused import * Remove explainer component * Convert flow header * Remove app header two * Update tests * Update header for new header * Fix tests * Add developer message component * Add test for networks * Delete styled components * Run lintfix * Fix test * Address PR feedback and convert some to ts * Fix error * Convert useFCL to ts * Make css classes deterministic * lintfix Co-authored-by: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
- Loading branch information
1 parent
ff0530a
commit 927be57
Showing
38 changed files
with
8,896 additions
and
5,333 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
{ | ||
"presets": ["next/babel"], | ||
"plugins": [ | ||
[ | ||
"styled-components", | ||
{ | ||
"ssr": true, | ||
"displayName": true, | ||
"preprocess": false | ||
} | ||
] | ||
] | ||
"plugins": [] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { | ||
Alert, | ||
AlertIcon, | ||
AlertTitle, | ||
AlertDescription, | ||
Link, | ||
} from '@chakra-ui/react' | ||
import { ExternalLinkIcon } from '@chakra-ui/icons' | ||
|
||
export default function FlowHeader() { | ||
return ( | ||
<Alert status="warning" marginBottom={3}> | ||
<AlertIcon /> | ||
<AlertTitle>Missing Config</AlertTitle> | ||
<AlertDescription> | ||
See how to set your app title and icon{' '} | ||
<Link | ||
href="/~https://github.com/onflow/fcl-discovery/blob/master/README.md#configuration" | ||
isExternal | ||
> | ||
here <ExternalLinkIcon mx="2px" /> | ||
</Link> | ||
. | ||
</AlertDescription> | ||
</Alert> | ||
) | ||
} |
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,26 @@ | ||
import styled from 'styled-components' | ||
import { COLORS } from '../../helpers/constants' | ||
import { Image, Text, Heading, HStack, Stack } from '@chakra-ui/react' | ||
import { useFCL } from '../../hooks/useFCL' | ||
|
||
const HeaderContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 10px 0; | ||
` | ||
|
||
const AppLogo = styled.img` | ||
height: 5rem; | ||
width: 5rem; | ||
border-radius: 10%; | ||
overflow: hidden; | ||
` | ||
|
||
const DefaultImgWrapper = styled.div` | ||
height: 5rem; | ||
width: 5rem; | ||
background: ${COLORS.GREY_LIGHTER_TWO}; | ||
border-radius: 10%; | ||
overflow: hidden; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
` | ||
|
||
const DefaultImg = styled.img` | ||
height: 4rem; | ||
width: 4rem; | ||
` | ||
|
||
const ClientDomain = styled.div` | ||
color: ${COLORS.SECONDARY}; | ||
margin-top: 5px; | ||
` | ||
|
||
export default function AppHeader() { | ||
const { appConfig, clientConfig } = useFCL() | ||
const title = appConfig?.title ? `Connect to ${appConfig?.title}` : 'Connect' | ||
|
||
return ( | ||
<HeaderContainer> | ||
{appConfig?.icon ? ( | ||
<AppLogo src={appConfig.icon} alt="Logo" /> | ||
) : ( | ||
<DefaultImgWrapper> | ||
<DefaultImg src="/images/default-img.svg" /> | ||
</DefaultImgWrapper> | ||
)} | ||
<ClientDomain>{clientConfig?.hostname}</ClientDomain> | ||
</HeaderContainer> | ||
<Stack marginBottom={25}> | ||
<Heading as="h2" size="md"> | ||
{title} | ||
</Heading> | ||
<HStack> | ||
{appConfig?.icon && ( | ||
<Image | ||
src={appConfig.icon} | ||
alt="Logo" | ||
borderRadius={50} | ||
boxSize="25px" | ||
/> | ||
)} | ||
<Text color="grey">{clientConfig?.hostname || 'Unknown'}</Text> | ||
</HStack> | ||
</Stack> | ||
) | ||
} |
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,41 +1,12 @@ | ||
import styled from 'styled-components' | ||
|
||
const AppHeader = styled.div` | ||
margin-bottom: 2rem; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
` | ||
|
||
const AppLogoWrapper = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
margin-bottom: 8px; | ||
` | ||
|
||
const AppLogo = styled.img` | ||
height: 3.5rem; | ||
` | ||
|
||
const AppTitle = styled.h2` | ||
text-align: left; | ||
color: #2a2825; | ||
font-size: 1.2rem; | ||
` | ||
import { Center, Flex, Image, Text } from '@chakra-ui/react' | ||
|
||
export default function FlowHeader() { | ||
return ( | ||
<AppHeader> | ||
<AppLogoWrapper> | ||
<AppLogo src="/logo.svg" alt="Flow Logo" /> | ||
</AppLogoWrapper> | ||
<AppTitle>Choose a Provider</AppTitle> | ||
</AppHeader> | ||
<Center> | ||
<Flex flexDirection="column" alignItems="center" marginBottom={4}> | ||
<Image src="/logo.svg" alt="Logo" w="140px" h="auto" marginBottom={3} /> | ||
<Text color="grey">Choose a Provider</Text> | ||
</Flex> | ||
</Center> | ||
) | ||
} |
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
Oops, something went wrong.
927be57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
fcl-discovery – ./
fcl-discovery-onflow.vercel.app
fcl-discovery-git-master-onflow.vercel.app
fcl-discovery.vercel.app
fcl-discovery.onflow.org