Skip to content

Commit

Permalink
fix: project from template image
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Dec 18, 2023
1 parent a609afe commit fb835b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/project/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ export function* projectSaga(builder: BuilderAPI) {

function* handleDuplicateProjectRequest(action: DuplicateProjectRequestAction) {
const { project, type, shouldRedirect } = action.payload
const isSDK7TemplatesEnabled: boolean = yield select(getIsSDK7TemplatesEnabled)
const ethAddress: string = yield select(getAddress)
const scene: Scene = yield getSceneByProjectId(project.id, type)

let thumbnail: string = project.thumbnail

try {
if (project.isTemplate) {
// TODO: remove this when the SDK7_TEMPLATES feature flag is removed
if (!isSDK7TemplatesEnabled && project.isTemplate) {
thumbnail = yield call(getImageAsDataUrl, `${BUILDER_SERVER_URL}/projects/${project.id}/media/thumbnail.png`)
} else if (thumbnail && isRemoteURL(thumbnail)) {
thumbnail = yield call(getImageAsDataUrl, project.thumbnail)
Expand Down

0 comments on commit fb835b3

Please sign in to comment.