-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom orbit pages #1732
feat: custom orbit pages #1732
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import { getBridgeUiConfigForChain } from '../util/bridgeUiConfig' | ||
import { useNetworks } from './useNetworks' | ||
|
||
export const useDestinationOrbitChain = () => { |
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.
export const useDestinationOrbitChain = () => { | |
export const useDestinationChainStyles = () => { |
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.
Updated.
chain: orbitChain, | ||
styles: orbitStyles |
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.
we don't really need the chain here, we can return only the styles object, and it can be empty when no chain detected
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.
Updated.
const [defaultSourceChainId] = getDestinationChainIds(destinationChainId) | ||
return { | ||
sourceChainId: | ||
getTeleportChainIdForOrbitChain(destinationChainId) ?? // show the grand-parent-chain id if valid, else get the parent chain id |
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.
I'd rather we default to L2 being source here, that's the flow that gets more usage
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.
yah sgtm to default to Arb One -> L3 instead of Ethereum -> L3
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.
Updated.
…e into feat-custom-orbit-pages-v2
) | ||
|
||
// early return if the orbit chain is not found | ||
if (!orbitChain) return undefined |
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.
return empty object here, that way it can still work as a style
prop
import { getBridgeUiConfigForChain } from '../util/bridgeUiConfig' | ||
import { useNetworks } from './useNetworks' | ||
|
||
export const useDestinationChainStyles = () => { |
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.
nit to rename to style
as that's the dom prop it will be passed to
export const useDestinationChainStyles = () => { | |
export const useDestinationChainStyle = () => { |
Closes FS-608