Skip to content

Commit f692dcc

Browse files
committed
fix(email): Fixing email Storybook so it correctly renders the digest email
1 parent 8032ba1 commit f692dcc

File tree

6 files changed

+10
-80
lines changed

6 files changed

+10
-80
lines changed

functions/src/email/example1.handlebars

Lines changed: 0 additions & 16 deletions
This file was deleted.

functions/src/email/example2.handlebars

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
"eslint-config-prettier": "^8.3.0",
176176
"eslint-plugin-i18next": "^6.0.3",
177177
"eslint-plugin-jsx-a11y": "^6.9.0",
178+
"file-loader": "^6.2.0",
178179
"firebase-admin": "^10",
179180
"firebase-tools": "^11.16.0",
180181
"ini": "^1.3.5",

stories_hold/emailTemplates/digest.stories.tsx renamed to stories/emailTemplates/NotificationDigestEmail.stories.tsx

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Meta, StoryObj } from "@storybook/react"
22
import digestEmail from "functions/src/email/digestEmail.handlebars"
3-
import example1 from "functions/src/email/example1.handlebars"
4-
import example2 from "functions/src/email/example2.handlebars"
5-
import { EmailTemplateRenderer } from "./email-template-renderer"
3+
import { EmailTemplateRenderer } from "./EmailTemplateRenderer"
64

75
const meta: Meta = {
86
title: "Email Templates/Digest",
@@ -22,43 +20,6 @@ export default meta
2220

2321
type Story = StoryObj<typeof EmailTemplateRenderer>
2422

25-
export const Example1: Story = {
26-
args: {
27-
templateSrcUrl: example1,
28-
context: {
29-
name: "Derek",
30-
street: "123 Main St",
31-
city: "Pittsburgh",
32-
state: "PA"
33-
}
34-
}
35-
}
36-
37-
export const Example2: Story = {
38-
args: {
39-
templateSrcUrl: example2,
40-
context: {
41-
name: "Yogi Berra",
42-
quotes: [
43-
{
44-
quote:
45-
"If you don't know where you are going, you might wind up someplace else."
46-
},
47-
{
48-
quote:
49-
"You better cut the pizza in four pieces because I'm not hungry enough to eat six."
50-
},
51-
{ quote: "I never said most of the things I said." },
52-
{ quote: "Nobody goes there anymore because it's too crowded." }
53-
],
54-
yogiBio:
55-
'<i>Lawrence Peter "Yogi" Berra (May 12, 1925 - September 22, 2015) was an American professional baseball catcher, manager, and coach who played 19 seasons in Major League Baseball (MLB) (1946 - 63, 1965), all but the last for the New York Yankees. An 18-time All-Star and 10-time World Series champion as a player, Berra had a career batting average of .285, while compiling 358 home runs and 1,430 runs batted in.</i>',
56-
url: "http://yogiberramuseum.org/",
57-
text: "Yogi Berra Museum"
58-
}
59-
}
60-
}
61-
6223
export const DigestEmail: Story = {
6324
args: {
6425
templateSrcUrl: digestEmail,

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8753,6 +8753,14 @@ file-entry-cache@^6.0.1:
87538753
dependencies:
87548754
flat-cache "^3.0.4"
87558755

8756+
file-loader@^6.2.0:
8757+
version "6.2.0"
8758+
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d"
8759+
integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==
8760+
dependencies:
8761+
loader-utils "^2.0.0"
8762+
schema-utils "^3.0.0"
8763+
87568764
file-selector@^0.5.0:
87578765
version "0.5.0"
87588766
resolved "https://registry.yarnpkg.com/file-selector/-/file-selector-0.5.0.tgz#21c7126dc9728b31a2742d91cab20d55e67e4fb4"

0 commit comments

Comments
 (0)