Skip to content

Commit

Permalink
test(apps/blog): appdir
Browse files Browse the repository at this point in the history
  • Loading branch information
LufyCZ committed Apr 14, 2024
1 parent caad4cd commit 6eadfcb
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 11 deletions.
7 changes: 7 additions & 0 deletions apps/blog/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react'

const Page = () => {
return <div>page</div>
}

export default Page
63 changes: 63 additions & 0 deletions apps/blog/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import '@sushiswap/ui/index.css'

import type { Metadata } from 'next'
import { Inter, Roboto_Mono } from 'next/font/google'
import React from 'react'

const inter = Inter({
subsets: ['latin'],
display: 'swap',
variable: '--font-inter',
})

const roboto_mono = Roboto_Mono({
subsets: ['latin'],
display: 'swap',
variable: '--font-roboto-mono',
})

export const metadata: Metadata = {
title: {
default: 'Sushi 🍣',
template: '%s | Sushi 🍣',
},
description:
'A Decentralised Finance (DeFi) app with features such as swap, cross chain swap, streaming, vesting, and permissionless market making for liquidity providers.',
}

export default function RootLayout({
children,
}: { children: React.ReactNode }) {
return (
// <html lang="en" className="[color-scheme:dark]">
<html
lang="en"
className={`${inter.variable} ${roboto_mono.variable} dark`}
suppressHydrationWarning={true}
>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/apple-touch-icon.png?v=1"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/favicon-32x32.png?v=1"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/favicon-16x16.png?v=1"
/>
<link rel="manifest" href="/site.webmanifest?v=1" />
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=1" color="#fa52a0" />
<link rel="shortcut icon" href="/favicon.ico?v=1" />
<body className="h-screen" suppressHydrationWarning={true}>
<div className="flex flex-col h-full">{children}</div>
</body>
</html>
)
}
1 change: 1 addition & 0 deletions apps/blog/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
22 changes: 11 additions & 11 deletions apps/blog/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import defaultNextConfig from '@sushiswap/nextjs-config'
/** @type {import('next').NextConfig} */
const nextConfig = {
...defaultNextConfig,
basePath: '/blog',
// basePath: '/blog',
transpilePackages: ['@sushiswap/ui'],
async redirects() {
return [
{
source: '/',
destination: '/blog',
permanent: true,
basePath: false,
},
]
},
// async redirects() {
// return [
// {
// source: '/',
// destination: '/blog',
// permanent: true,
// basePath: false,
// },
// ]
// },
}

export default nextConfig

0 comments on commit 6eadfcb

Please sign in to comment.