-
Notifications
You must be signed in to change notification settings - Fork 4
Chore/next app router nextra deps update #238
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
base: main
Are you sure you want to change the base?
Changes from all commits
a0c1752
edd31cb
59ba0ef
235d710
ec181ed
23bfac0
f5ee66f
50a5447
a911a85
afd4eb6
7166ebf
a7c9bbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { defineConfig, globalIgnores } from "eslint/config"; | ||
| import nextVitals from "eslint-config-next/core-web-vitals"; | ||
| import prettier from "eslint-config-prettier"; | ||
|
|
||
| const eslintConfig = defineConfig([ | ||
| ...nextVitals, | ||
| prettier, | ||
| { | ||
| rules: { | ||
| "react/no-unescaped-entities": "off", | ||
| }, | ||
| }, | ||
| globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"]), | ||
| ]); | ||
|
|
||
| export default eslintConfig; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> | ||
| <url><loc>https://transferagentprotocol.xyz</loc><lastmod>2026-02-08T01:07:33.911Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
| <url><loc>https://transferagentprotocol.xyz/mint</loc><lastmod>2026-02-08T01:07:33.912Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
| <url><loc>https://transferagentprotocol.xyz/mint</loc><lastmod>2026-03-01T17:15:08.009Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
| <url><loc>https://transferagentprotocol.xyz</loc><lastmod>2026-03-01T17:15:08.010Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
| </urlset> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import type { Metadata, Viewport } from "next"; | ||
| import { IBM_Plex_Mono } from "next/font/google"; | ||
| import Providers from "./providers"; | ||
|
|
||
| const plex = IBM_Plex_Mono({ | ||
| weight: ["400", "500", "600", "700"], | ||
| style: ["normal", "italic"], | ||
| subsets: ["latin-ext"], | ||
| display: "swap", | ||
| preload: true, | ||
| }); | ||
|
|
||
| export const metadata: Metadata = { | ||
| authors: [{ name: "Transfer Agent Protocol" }], | ||
| description: | ||
| "Mint equity cap tables onchain. Open-source and regulatory compliant infrastructure for tokenized capital markets and transfer agents.", | ||
| title: "Transfer Agent Protocol", | ||
| openGraph: { | ||
| type: "website", | ||
| siteName: "Transfer Agent Protocol", | ||
| url: "https://transferagentprotocol.xyz", | ||
| title: "Transfer Agent Protocol", | ||
| description: | ||
| "Mint equity cap tables onchain. Open-source and regulatory compliant infrastructure for tokenized capital markets and transfer agents.", | ||
| }, | ||
| alternates: { | ||
| canonical: "https://transferagentprotocol.xyz", | ||
| }, | ||
| manifest: "/manifest.json", | ||
| icons: { | ||
| icon: [ | ||
| { url: "/favicon.ico" }, | ||
| { url: "/favicon-16x16.png", sizes: "16x16", type: "image/png" }, | ||
| { url: "/favicon-32x32.png", sizes: "32x32", type: "image/png" }, | ||
| ], | ||
| apple: [{ url: "/icons/apple-touch-icon.png", sizes: "180x180" }], | ||
| other: [{ rel: "mask-icon", url: "/safari-pinned-tab.svg" }], | ||
| }, | ||
| other: { | ||
| "msapplication-TileColor": "#0c0b0c", | ||
| }, | ||
| }; | ||
|
|
||
| export const viewport: Viewport = { | ||
| width: "device-width", | ||
| initialScale: 1, | ||
| minimumScale: 1, | ||
| userScalable: true, | ||
| themeColor: "#fafafc", | ||
| }; | ||
|
|
||
| export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <html lang="en"> | ||
| <body className={plex.className}> | ||
| <Providers>{children}</Providers> | ||
| </body> | ||
| </html> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| "use client"; | ||
|
|
||
| import { useEffect } from "react"; | ||
| import { ThemeProvider } from "styled-components"; | ||
| import theme from "../components/theme"; | ||
| import GlobalStyle from "../components/globalstyle"; | ||
| import Layout from "../components/Layout"; | ||
| import Web3Provider from "../config/Web3Provider"; | ||
|
|
||
| export default function Providers({ children }: { children: React.ReactNode }) { | ||
| // Suppress unhandled rejections from wallet SDK analytics blocked by ad blockers | ||
| useEffect(() => { | ||
| const handler = (e: PromiseRejectionEvent) => { | ||
| const msg = e.reason?.message || String(e.reason || ""); | ||
| if ( | ||
| msg.includes("Failed to fetch") || | ||
| msg.includes("ERR_BLOCKED_BY_CLIENT") || | ||
|
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caution (Low): The Consider narrowing by also checking the error's if (
msg.includes("ERR_BLOCKED_BY_CLIENT") ||
msg.includes("AnalyticsSDK") ||
msg.includes("pulse.walletconnect") ||
(msg.includes("Failed to fetch") && (msg.includes("walletconnect") || msg.includes("reown")))
) {Not blocking, but worth tightening if you notice swallowed errors during development. |
||
| msg.includes("AnalyticsSDK") || | ||
| msg.includes("pulse.walletconnect") | ||
| ) { | ||
| e.preventDefault(); | ||
| } | ||
| }; | ||
| window.addEventListener("unhandledrejection", handler); | ||
| return () => window.removeEventListener("unhandledrejection", handler); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <Web3Provider> | ||
| <ThemeProvider theme={theme}> | ||
| <GlobalStyle /> | ||
| <Layout>{children}</Layout> | ||
| </ThemeProvider> | ||
| </Web3Provider> | ||
| ); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider (medium priority): The migration replaces the Without it, you may see a Flash of Unstyled Content (FOUC) in production — especially on first load or slow connections. If your build and dev testing look fine today, this is likely fine to ship, but keep it in mind as the root cause if FOUC is ever reported. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| "use client"; | ||
|
|
||
| import styled from "styled-components"; | ||
| import dynamic from "next/dynamic"; | ||
| import { Nav } from "./wrappers"; | ||
| import { LogoRouter, StyledA, WalletButtonStyled } from "./buttons"; | ||
| import Link from "next/link"; | ||
| import Image from "next/image"; | ||
| import { useRouter } from "next/router"; | ||
| import { usePathname } from "next/navigation"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug (Medium): With this migration to <a href="https://docs.transferagentprotocol.xyz" target="_blank" rel="noopener noreferrer">Docs</a><a href="https://github.com/transfer-agent-protocol/tap-cap-table" target="_blank" rel="noopener noreferrer">Github</a>The |
||
|
|
||
| const NavActions = styled.span` | ||
| display: flex; | ||
|
|
@@ -20,7 +22,7 @@ const WalletButton = dynamic(() => import("./WalletButtonClient"), { | |
| }); | ||
|
|
||
| export default function Navbar() { | ||
| const { pathname } = useRouter(); | ||
| const pathname = usePathname(); | ||
| const showWallet = pathname === "/mint"; | ||
|
|
||
| return ( | ||
|
|
||
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 (Low): Inconsistent
relattributes on external links. Line 12 hasrel="noopener noreferrer"(good), but line 13 only hasrel="noopener"(missingnoreferrer). Several links on lines 19 and 31 havetarget="_blank"with norelat all. Worth standardizing torel="noopener noreferrer"on alltarget="_blank"links.Note: this inconsistency pre-dates this PR, but since the file was touched it's a good opportunity to clean up.