Skip to content
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

Intercept Autonomy Network limit order functionality #1

Open
wants to merge 7 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ module.exports = withBundleAnalyzer(
source: '/limit-order/:token*',
destination: '/exchange/limit-order/:token*',
},
{
source: '/stop-loss',
destination: '/exchange/stop-loss',
},
{
source: '/stop-loss/:token*',
destination: '/exchange/stop-loss/:token*',
},
{
source: '/stop-loss',
destination: '/exchange/stop-loss',
},
{
source: '/open-order',
destination: '/exchange/open-order',
Expand Down
13 changes: 12 additions & 1 deletion src/components/ExchangeHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ExchangeHeader: FC<ExchangeHeaderProps> = ({ input, output, allowedSlippag

return (
<div className="flex justify-between mb-4 space-x-3 items-center">
<div className="grid grid-cols-3 rounded p-3px bg-dark-800 h-[46px]">
<div className="grid grid-cols-4 rounded p-3px bg-dark-800 h-[46px]">
<NavLink
activeClassName="font-bold border rounded text-high-emphesis border-dark-800 bg-gradient-to-r from-opaque-blue to-opaque-pink hover:from-blue hover:to-pink"
href={{
Expand All @@ -60,6 +60,17 @@ const ExchangeHeader: FC<ExchangeHeaderProps> = ({ input, output, allowedSlippag
{i18n._(t`Limit`)}
</a>
</NavLink>
<NavLink
activeClassName="font-bold border rounded text-high-emphesis border-dark-800 bg-gradient-to-r from-opaque-blue to-opaque-pink hover:from-blue hover:to-pink"
href={{
pathname: '/stop-loss',
query: getQuery(input, output),
}}
>
<a className="flex items-center justify-center px-4 text-base font-medium text-center rounded-md text-secondary hover:text-high-emphesis">
{i18n._(t`Stop Loss`)}
</a>
</NavLink>
<NavLink
activeClassName="font-bold border rounded text-high-emphesis border-dark-800 bg-gradient-to-r from-opaque-blue to-opaque-pink hover:from-blue hover:to-pink"
href={`/${!isRemove ? 'add' : 'remove'}${input ? `/${currencyId(input)}` : ''}${
Expand Down
Loading