Compare commits

...

3 Commits

Author SHA1 Message Date
RadekSabacky 191240da2e + basepath env into image src 2025-07-08 13:48:08 +02:00
RadekSabacky 68ddf095b4 / remove /explorer from image src 2025-07-08 12:47:25 +02:00
RadekSabacky e873121cc2 / base path as env variable 2025-07-08 12:38:49 +02:00
6 changed files with 12 additions and 9 deletions
+6 -3
View File
@@ -1,11 +1,14 @@
// @ts-check
/** @type {import('next').NextConfig} */
const { NEXT_PUBLIC_EXPLORER_BASEPATH } = process.env;
const nextConfig = {
reactStrictMode: true,
basePath: "/explorer",
assetPrefix: "/explorer",
basePath: `/${NEXT_PUBLIC_EXPLORER_BASEPATH}`,
assetPrefix: `/${NEXT_PUBLIC_EXPLORER_BASEPATH}`,
trailingSlash: false,
async redirects() {
@@ -13,7 +16,7 @@ const nextConfig = {
// Change the basePath to /explorer
{
source: "/",
destination: "/explorer",
destination: `/${NEXT_PUBLIC_EXPLORER_BASEPATH}`,
basePath: false,
permanent: true,
},
@@ -17,7 +17,7 @@ export default async function BlogPage({
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const { NEXT_PUBLIC_EXPLORER_BASEPATH } = process.env;
try {
const blogArticle: BlogArticle = await import(`@/data/${slug}.json`);
@@ -87,7 +87,7 @@ export default async function BlogPage({
</Typography>
</Box>
<Image
src={blogArticle.image}
src={`/${NEXT_PUBLIC_EXPLORER_BASEPATH}${blogArticle.image}`}
alt="blog-image"
width={120}
height={60}
@@ -10,7 +10,7 @@
},
"iconLight": "explorerCard",
"iconDark": "explorerCardDark",
"image": "/explorer/images/Network.webp",
"image": "/images/Network.webp",
"overview": {
"content": [
{
+1 -1
View File
@@ -10,7 +10,7 @@
},
"iconLight": "gateway",
"iconDark": "gatewayDark",
"image": "/explorer/images/placeholder.webp",
"image": "/images/placeholder.webp",
"overview": {
"content": [
{
+1 -1
View File
@@ -10,7 +10,7 @@
},
"iconLight": "gateway",
"iconDark": "gatewayDark",
"image": "/explorer/images/placeholder.webp",
"image": "/images/placeholder.webp",
"overview": {
"content": [
{
+1 -1
View File
@@ -10,7 +10,7 @@
},
"iconLight": "stakeCard",
"iconDark": "stakeCardDark",
"image": "/explorer/images/stake-article.webp",
"image": "/images/stake-article.webp",
"overview": {
"content": [
{