Skip to content

fix: load sample#75

Merged
solidsnakedev merged 1 commit into
mainfrom
fix/blueprint-samepl
Nov 26, 2025
Merged

fix: load sample#75
solidsnakedev merged 1 commit into
mainfrom
fix/blueprint-samepl

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 26, 2025 00:49
@solidsnakedev solidsnakedev merged commit e4b48cb into main Nov 26, 2025
6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the sample blueprint loading functionality by adding the /evolution-sdk/ base path prefix to the fetch URL, aligning it with the GitHub Pages deployment configuration.

Key Changes:

  • Updated the fetch URL in loadSample() to include the /evolution-sdk/ prefix for GitHub Pages compatibility

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const loadSample = async () => {
try {
const response = await fetch('/sample-blueprint.json')
const response = await fetch('/evolution-sdk/sample-blueprint.json')
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded /evolution-sdk/ prefix will break the sample loading functionality in local development. According to next.config.mjs, the basePath is conditionally set to /evolution-sdk only in CI (GitHub Pages), but is empty in local dev mode.

Consider using Next.js's base path handling or a configuration-based approach:

const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ''
const response = await fetch(`${basePath}/sample-blueprint.json`)

Or use a relative path that works regardless of base path:

const response = await fetch('./sample-blueprint.json')
Suggested change
const response = await fetch('/evolution-sdk/sample-blueprint.json')
const response = await fetch('./sample-blueprint.json')

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants