forked from zalify/easy-email-editor
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from zalify/master
Merge
- Loading branch information
Showing
5 changed files
with
125 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,58 @@ | ||
import templates from '@demo/config/templates.json'; | ||
|
||
export async function getTemplate(id: string|number) { | ||
export async function getTemplate(id: string | number) { | ||
const item = templates.find(item => item.article_id === +id); | ||
if (!item) return null; | ||
let data:any = null; | ||
let data: any = null; | ||
switch (item.path) { | ||
|
||
case 'Arturia - Newsletter.json': | ||
data = (await import("@demo/templates/Arturia - Newsletter.json")).default; | ||
case 'Arturia - Newsletter.json': | ||
data = (await import('@demo/templates/Arturia - Newsletter.json')).default; | ||
break; | ||
case 'DynamicData.json': | ||
data = (await import("@demo/templates/DynamicData.json")).default; | ||
|
||
case 'DynamicData.json': | ||
data = (await import('@demo/templates/DynamicData.json')).default; | ||
break; | ||
case 'Food.json': | ||
data = (await import("@demo/templates/Food.json")).default; | ||
|
||
case 'Food.json': | ||
data = (await import('@demo/templates/Food.json')).default; | ||
break; | ||
case 'MJML Code - Newsletter.json': | ||
data = (await import("@demo/templates/MJML Code - Newsletter.json")).default; | ||
|
||
case 'MJML Code - Newsletter.json': | ||
data = (await import('@demo/templates/MJML Code - Newsletter.json')).default; | ||
break; | ||
case 'Racoon - Ecommerce.json': | ||
data = (await import("@demo/templates/Racoon - Ecommerce.json")).default; | ||
|
||
case 'Racoon - Ecommerce.json': | ||
data = (await import('@demo/templates/Racoon - Ecommerce.json')).default; | ||
break; | ||
|
||
case 'Real Estate.json': | ||
data = (await import("@demo/templates/Real Estate.json")).default; | ||
|
||
case 'Real Estate.json': | ||
data = (await import('@demo/templates/Real Estate.json')).default; | ||
break; | ||
|
||
case 'Shop - Newsletter.json': | ||
data = (await import('@demo/templates/Shop - Newsletter.json')).default; | ||
break; | ||
case 'Shop - Newsletter.json': | ||
data = (await import("@demo/templates/Shop - Newsletter.json")).default; | ||
|
||
case 'Sphero - Newsletter.json': | ||
data = (await import('@demo/templates/Sphero - Newsletter.json')).default; | ||
break; | ||
case 'Sphero - Newsletter.json': | ||
data = (await import("@demo/templates/Sphero - Newsletter.json")).default; | ||
|
||
case 'Star Wars.json': | ||
data = (await import('@demo/templates/Star Wars.json')).default; | ||
break; | ||
case 'Star Wars.json': | ||
data = (await import("@demo/templates/Star Wars.json")).default; | ||
|
||
case 'Stay Updated On Our Shopping.json': | ||
data = (await import('@demo/templates/Stay Updated On Our Shopping.json')).default; | ||
break; | ||
|
||
case 'Stay Updated On Our Shopping.json': | ||
data = (await import("@demo/templates/Stay Updated On Our Shopping.json")).default; | ||
|
||
case 'We Serve Healthy & Delicious Foods.json': | ||
data = (await import('@demo/templates/We Serve Healthy & Delicious Foods.json')) | ||
.default; | ||
break; | ||
case 'We Serve Healthy & Delicious Foods.json': | ||
data = (await import("@demo/templates/We Serve Healthy & Delicious Foods.json")).default; | ||
|
||
case `St. Patrick's Day - Newsletter.json`: | ||
data = (await import(`@demo/templates/St. Patrick Day - Newsletter.json`)).default; | ||
break; | ||
|
||
} | ||
return data; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3a6c06a
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.
Successfully deployed to the following URLs:
easy-email – ./
easy-email-git-master-m-ryan.vercel.app
easy-email-m-ryan.vercel.app
email.maocanhua.cn