<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on renaming and restructuring routes from `/connect` to `/wallets`, alongside adjustments in documentation links and component imports to streamline the application.
### Detailed summary
- Updated redirect paths from `/connect/...` to `/wallets/...`
- Changed documentation links accordingly
- Refactored component imports to match new route structure
- Adjusted breadcrumb links and sidebar navigation items
- Renamed files and folders to reflect the new `/wallets` hierarchy
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Expanded and reorganized URL redirects for improved navigation, including new paths for wallets, payments, and transactions sections.
* **Refactor**
* Updated navigation links and internal references to use new URL structures for wallets, payments, and transactions.
* Simplified import paths and component structures for improved code clarity and maintainability.
* **Documentation**
* Updated documentation links throughout the app to reflect new URLs and more relevant resources.
* **Style**
* Minor formatting improvements for code consistency and readability.
* **Chores**
* Enhanced code comments to clarify the use of array index as React list keys.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
139 lines
3.2 KiB
JavaScript
139 lines
3.2 KiB
JavaScript
const ContentSecurityPolicy = `
|
|
default-src 'self';
|
|
img-src * data: blob:;
|
|
media-src * data: blob:;
|
|
object-src 'none';
|
|
style-src 'self' 'unsafe-inline';
|
|
font-src 'self';
|
|
frame-src * data:;
|
|
script-src 'self' 'unsafe-eval' 'unsafe-inline' 'wasm-unsafe-eval' 'inline-speculation-rules' *.thirdweb.com thirdweb.com *.thirdweb-dev.com vercel.live js.stripe.com;
|
|
connect-src * data: blob:;
|
|
worker-src 'self' blob:;
|
|
block-all-mixed-content;
|
|
`;
|
|
|
|
const securityHeaders = [
|
|
{
|
|
key: "X-DNS-Prefetch-Control",
|
|
value: "on",
|
|
},
|
|
{
|
|
key: "X-XSS-Protection",
|
|
value: "1; mode=block",
|
|
},
|
|
{
|
|
key: "X-Frame-Options",
|
|
value: "SAMEORIGIN",
|
|
},
|
|
{
|
|
key: "Referrer-Policy",
|
|
value: "origin-when-cross-origin",
|
|
},
|
|
{
|
|
key: "Content-Security-Policy",
|
|
value: ContentSecurityPolicy.replace(/\s{2,}/g, " ").trim(),
|
|
},
|
|
];
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
experimental: {
|
|
serverSourceMaps: false,
|
|
webpackBuildWorker: true,
|
|
webpackMemoryOptimizations: true,
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
headers: securityHeaders,
|
|
source: "/(.*)",
|
|
},
|
|
];
|
|
},
|
|
productionBrowserSourceMaps: false,
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/connect/pay",
|
|
destination: "/payments/ui-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/pay/:path*",
|
|
destination: "/payments/:path*",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/ui",
|
|
destination: "/wallets/headless/account-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/ui/nft",
|
|
destination: "/wallets/headless/nft-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/ui/token",
|
|
destination: "/wallets/headless/token-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/ui/chain",
|
|
destination: "/wallets/headless/chain-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/ui/wallet",
|
|
destination: "/wallets/headless/wallet-components",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/connect/:path*",
|
|
destination: "/wallets/:path*",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/engine/airdrop",
|
|
destination: "/transactions/airdrop-tokens",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/engine/minting",
|
|
destination: "/transactions/mint-tokens",
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/engine/webhooks",
|
|
destination: "/transactions/webhooks",
|
|
permanent: false,
|
|
},
|
|
];
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
destination: "https://us-assets.i.posthog.com/static/:path*",
|
|
source: "/_ph/static/:path*",
|
|
},
|
|
{
|
|
destination: "https://us.i.posthog.com/:path*",
|
|
source: "/_ph/:path*",
|
|
},
|
|
{
|
|
destination: "https://us.i.posthog.com/decide",
|
|
source: "/_ph/decide",
|
|
},
|
|
];
|
|
},
|
|
webpack: (config) => {
|
|
config.externals.push("pino-pretty", "lokijs", "encoding");
|
|
return config;
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|