Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/zaps
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMasayoshi committed Nov 1, 2024
2 parents 6606047 + 33b4b34 commit 9885125
Show file tree
Hide file tree
Showing 153 changed files with 3,818 additions and 1,803 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ out/
build
dist
robots.txt
sitemap*.xml
analyze/

# misc
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"class-variance-authority": "0.7.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"sushi": "4.0.2"
"sushi": "4.1.9"
},
"devDependencies": {
"@storybook/addon-a11y": "7.4.6",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"react-window": "1.8.7",
"sharp": "^0.33.5",
"strapi-sdk-js": "2.3.3",
"sushi": "4.0.5",
"sushi": "4.1.9",
"swr": "2.1.5",
"tiny-invariant": "1.3.1",
"tronweb": "5.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ interface DifficultyLabel {
export function DifficultyLabel({ article, isCard }: DifficultyLabel) {
const difficulty = article.difficulty

if (!difficulty) return <></>

const slug = difficulty.slug as keyof typeof DIFFICULTY_ELEMENTS
if (!slug) return <></>

Expand Down
46 changes: 46 additions & 0 deletions apps/web/src/app/(cms)/academy/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { getAcademyArticles } from '@sushiswap/graph-client/strapi'
import type { MetadataRoute } from 'next'

export const revalidate = 0

const products = ['bentobox', 'furo', 'onsen', 'sushixswap']

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
try {
const { articles } = await getAcademyArticles({
pagination: { pageSize: 10000 },
})

return [
{
url: 'https://www.sushi.com/academy',
lastModified: new Date(),
changeFrequency: 'yearly',
},
{
url: 'https://www.sushi.com/academy/explore',
lastModified: new Date(),
changeFrequency: 'yearly',
},
...products.map(
(product) =>
({
url: `https://www.sushi.com/academy/products/${product}`,
lastModified: new Date(),
changeFrequency: 'yearly',
}) as const,
),
...articles.map(
(article) =>
({
url: `https://www.sushi.com/academy/${article.slug}`,
lastModified: new Date(article.updatedAt),
changeFrequency: 'weekly',
}) as const,
),
]
} catch {
console.error('sitemap: Error fetching academy articles')
return []
}
}
31 changes: 31 additions & 0 deletions apps/web/src/app/(cms)/blog/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { getBlogArticles } from '@sushiswap/graph-client/strapi'
import type { MetadataRoute } from 'next'

export const revalidate = 0

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
try {
const { articles } = await getBlogArticles({
pagination: { pageSize: 10000 },
})

return [
{
url: 'https://www.sushi.com/blog',
lastModified: new Date(),
changeFrequency: 'yearly',
},
...articles.map(
(article) =>
({
url: `https://www.sushi.com/blog/${article.slug}`,
lastModified: new Date(article.updatedAt),
changeFrequency: 'weekly',
}) as const,
),
]
} catch {
console.error('sitemap: Error fetching blog articles')
return []
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Metadata } from 'next'

export const metadata: Metadata = {
title: 'My Rewards',
description: 'Claim your rewards from SushiSwap.',
}

export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import React from 'react'

import { MigrateTabContent } from 'src/ui/pool/MigrateTabContent'
import { ChainId } from 'sushi'
import { isSushiSwapV2ChainId } from 'sushi/config'

export const metadata: Metadata = {
title: 'Migrate',
description: 'A SushiSwap V2 to V3 migration tool.',
}

export default function MigratePage({
params,
}: { params: { chainId: string } }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Metadata } from 'next'

export const metadata: Metadata = {
title: 'My Positions',
description:
'Manage your liquidity on SushiSwap: add or remove liquidity, track all your positions and claim fees.',
}

export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Metadata } from 'next'

export const metadata: Metadata = {
title: 'My Rewards',
description: 'Claim your rewards from SushiSwap.',
}

export default function Layout({ children }: { children: React.ReactNode }) {
return <>{children}</>
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { ChainId } from 'sushi/chain'
import {
Expand All @@ -7,6 +8,12 @@ import {
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { Providers } from './providers'

export const metadata: Metadata = {
title: 'Cross-Chain Swap',
description:
'Swap assets across multiple blockchains with ease using Cross-Chain Swap. Enjoy secure, seamless cross-chain swaps for a streamlined DeFi experience on Sushi.com.',
}

export default function CrossChainSwapLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Container } from '@sushiswap/ui'
import { CrossChainSwapWidget } from 'src/ui/swap/cross-chain/cross-chain-swap-widget'

export const metadata = {
title: 'Cross-Chain Swap',
description: 'SushiSwap Cross-Chain Swap',
}

export default async function CrossChainSwapPage() {
return (
<Container maxWidth="lg" className="px-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { TWAP_SUPPORTED_CHAIN_IDS, isTwapSupportedChainId } from 'src/config'
import { ChainId } from 'sushi/chain'
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { Providers } from './providers'

export const metadata: Metadata = {
title: 'DCA',
description:
"Dollar-cost average into your favorite tokens with SushiSwap's DCA tool.",
}

export default function SwapDCALayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const TWAPPanel = dynamic(
{ ssr: false },
)

export const metadata = {
title: 'Dollar-Cost Averaging (DCA)',
description: 'SushiSwap Dollar-Cost Averaging (DCA)',
}

export default function SwapDCAPage() {
return (
<Container maxWidth="lg" className="px-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { TWAP_SUPPORTED_CHAIN_IDS, isTwapSupportedChainId } from 'src/config'
import { ChainId } from 'sushi/chain'
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { Providers } from './providers'

export const metadata: Metadata = {
title: 'Limit',
description: 'Trade with limit orders on SushiSwap.',
}

export default function SwapLimitLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ const LimitPanel = dynamic(
{ ssr: false },
)

export const metadata = {
title: 'Limit Order',
description: 'SushiSwap Limit Order',
}

export default function SwapLimitPage() {
return (
<Container maxWidth="lg" className="px-4">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { SUPPORTED_NETWORKS, isSupportedChainId } from 'src/config'
import { ChainId } from 'sushi/chain'
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { Providers } from './providers'

export const metadata: Metadata = {
title: 'Swap',
description:
'Trade crypto effortlessly with SushiSwap, supporting over 30 chains and featuring a powerful aggregator for the best rates across DeFi.',
}

export default function SwapLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { Container } from '@sushiswap/ui'
import { SimpleSwapWidget } from 'src/ui/swap/simple/simple-swap-widget'

export const metadata = {
title: 'SushiSwap',
}

export default function SwapSimplePage() {
return (
<Container maxWidth="lg" className="px-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { ChainId } from 'sushi/chain'
import { SidebarProvider } from '~evm/_common/ui/sidebar'
import { Header } from '../header'

export const metadata = {
title: 'Pools 💦',
}

export default async function ExploreLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isPoolChainId } from '@sushiswap/graph-client/data-api'
import { Container } from '@sushiswap/ui'
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import React from 'react'
import { POOL_SUPPORTED_NETWORKS } from 'src/config'
Expand All @@ -9,6 +10,11 @@ import { ChainId } from 'sushi/chain'
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { NavigationItems } from '../navigation-items'

export const metadata: Metadata = {
title: 'Pools',
description: 'Explore SushiSwap pools.',
}

export default async function ExploreLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
isSmartPoolChainId,
} from '@sushiswap/graph-client/data-api'
import { Container } from '@sushiswap/ui'
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import React from 'react'
import { GlobalStatsCharts } from 'src/ui/explore/global-stats-charts'
Expand All @@ -11,6 +12,12 @@ import { ChainId } from 'sushi/chain'
import { SidebarContainer } from '~evm/_common/ui/sidebar'
import { NavigationItems } from '../navigation-items'

export const metadata: Metadata = {
title: 'Smart Pools',
description:
'Smart pools optimize liquidity allocation within custom price ranges, enhancing trading efficiency by providing deeper liquidity around the current price, increasing Liquidity Providers fee earnings.',
}

export default async function ExploreLayout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Container, typographyVariants } from '@sushiswap/ui'
import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { BackButton } from 'src/ui/pool/BackButton'
import { ChainId } from 'sushi/chain'
import { isMerklChainId } from 'sushi/config'

export const metadata: Metadata = {
title: 'Incentivize',
description:
'Add rewards to a pool to incentivize liquidity providers joining in.',
}

export default function Layout({
children,
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { getV2Pool } from '@sushiswap/graph-client/data-api'
import { Metadata } from 'next'
import { unstable_cache } from 'next/cache'
import { notFound } from 'next/navigation'
import { ChainId } from 'sushi'
import { isSushiSwapV2ChainId } from 'sushi/config'
import { isAddress } from 'viem'

export const metadata = {
export const metadata: Metadata = {
title: 'Pool 💦',
}

Expand Down
Loading

0 comments on commit 9885125

Please sign in to comment.