From f5a56836d52c22b60b7cdb49fad107343538e592 Mon Sep 17 00:00:00 2001 From: Caroline Liu Date: Fri, 7 May 2021 11:26:39 -0400 Subject: [PATCH] Add deleted and invalid tweet-id cases --- .../amp-twitter/0.1/storybook/Basic.amp.js | 50 +++++++++++++++++++ .../amp-twitter/1.0/storybook/Basic.amp.js | 50 +++++++++++++++++++ 2 files changed, 100 insertions(+) diff --git a/extensions/amp-twitter/0.1/storybook/Basic.amp.js b/extensions/amp-twitter/0.1/storybook/Basic.amp.js index f00387f82a43..2341969035c7 100644 --- a/extensions/amp-twitter/0.1/storybook/Basic.amp.js +++ b/extensions/amp-twitter/0.1/storybook/Basic.amp.js @@ -83,3 +83,53 @@ export const timelines = () => { /> ); }; + +export const deletedTweet = () => { + const withFallback = boolean('include fallback?', true); + return ( + +
+

+ In case you missed it last week, check out our recap of AMP in 2020 + ⚡🙌 +

+

+ Watch here ➡️ +
+ https://t.co/eaxT3MuSAK +

+
+ {withFallback && ( +
+ An error occurred while retrieving the tweet. It might have been + deleted. +
+ )} +
+ ); +}; + +export const invalidTweet = () => { + return ( + + + + ); +}; diff --git a/extensions/amp-twitter/1.0/storybook/Basic.amp.js b/extensions/amp-twitter/1.0/storybook/Basic.amp.js index 610c100d4971..ecaa0e9230d3 100644 --- a/extensions/amp-twitter/1.0/storybook/Basic.amp.js +++ b/extensions/amp-twitter/1.0/storybook/Basic.amp.js @@ -84,3 +84,53 @@ export const timelines = () => { /> ); }; + +export const deletedTweet = () => { + const withFallback = boolean('include fallback?', true); + return ( + +
+

+ In case you missed it last week, check out our recap of AMP in 2020 + ⚡🙌 +

+

+ Watch here ➡️ +
+ https://t.co/eaxT3MuSAK +

+
+ {withFallback && ( +
+ An error occurred while retrieving the tweet. It might have been + deleted. +
+ )} +
+ ); +}; + +export const invalidTweet = () => { + return ( + + + + ); +};