diff --git a/app/soapbox/features/placeholder/components/placeholder_account.js b/app/soapbox/features/placeholder/components/placeholder_account.js deleted file mode 100644 index 4d638046bc..0000000000 Binary files a/app/soapbox/features/placeholder/components/placeholder_account.js and /dev/null differ diff --git a/app/soapbox/features/placeholder/components/placeholder_account.tsx b/app/soapbox/features/placeholder/components/placeholder_account.tsx new file mode 100644 index 0000000000..ad31db3a43 --- /dev/null +++ b/app/soapbox/features/placeholder/components/placeholder_account.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +import PlaceholderAvatar from './placeholder_avatar'; +import PlaceholderDisplayName from './placeholder_display_name'; + +/** Fake account to display while data is loading. */ +const PlaceholderAccount: React.FC = () => { + return ( +
+
+ +
+ +
+ +
+
+
+ ); +}; + +export default PlaceholderAccount; diff --git a/app/soapbox/features/placeholder/components/placeholder_card.js b/app/soapbox/features/placeholder/components/placeholder_card.tsx similarity index 85% rename from app/soapbox/features/placeholder/components/placeholder_card.js rename to app/soapbox/features/placeholder/components/placeholder_card.tsx index 87b7e5caf9..92911b9d64 100644 Binary files a/app/soapbox/features/placeholder/components/placeholder_card.js and b/app/soapbox/features/placeholder/components/placeholder_card.tsx differ diff --git a/app/soapbox/features/placeholder/components/placeholder_chat.js b/app/soapbox/features/placeholder/components/placeholder_chat.js deleted file mode 100644 index a3763b4164..0000000000 Binary files a/app/soapbox/features/placeholder/components/placeholder_chat.js and /dev/null differ diff --git a/app/soapbox/features/placeholder/components/placeholder_chat.tsx b/app/soapbox/features/placeholder/components/placeholder_chat.tsx new file mode 100644 index 0000000000..6b587f03da --- /dev/null +++ b/app/soapbox/features/placeholder/components/placeholder_chat.tsx @@ -0,0 +1,31 @@ +import React from 'react'; + +import { randomIntFromInterval, generateText } from '../utils'; + +import PlaceholderAvatar from './placeholder_avatar'; +import PlaceholderDisplayName from './placeholder_display_name'; + +/** Fake chat to display while data is loading. */ +const PlaceholderChat: React.FC = () => { + const messageLength = randomIntFromInterval(5, 75); + + return ( +
+
+
+
+
+ +
+ + + {generateText(messageLength)} + +
+
+
+
+ ); +}; + +export default PlaceholderChat; diff --git a/app/soapbox/features/placeholder/components/placeholder_hashtag.js b/app/soapbox/features/placeholder/components/placeholder_hashtag.js deleted file mode 100644 index 81c7882384..0000000000 Binary files a/app/soapbox/features/placeholder/components/placeholder_hashtag.js and /dev/null differ diff --git a/app/soapbox/features/placeholder/components/placeholder_hashtag.tsx b/app/soapbox/features/placeholder/components/placeholder_hashtag.tsx new file mode 100644 index 0000000000..28dceec72a --- /dev/null +++ b/app/soapbox/features/placeholder/components/placeholder_hashtag.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +import { generateText, randomIntFromInterval } from '../utils'; + +/** Fake hashtag to display while data is loading. */ +const PlaceholderHashtag: React.FC = () => { + const length = randomIntFromInterval(15, 30); + + return ( +
+
+
+ {generateText(length)} +
+
+
+ ); +}; + +export default PlaceholderHashtag; diff --git a/app/soapbox/features/placeholder/components/placeholder_material_status.js b/app/soapbox/features/placeholder/components/placeholder_material_status.js deleted file mode 100644 index 3199d42aa2..0000000000 Binary files a/app/soapbox/features/placeholder/components/placeholder_material_status.js and /dev/null differ diff --git a/app/soapbox/features/placeholder/components/placeholder_material_status.tsx b/app/soapbox/features/placeholder/components/placeholder_material_status.tsx new file mode 100644 index 0000000000..28581cb099 --- /dev/null +++ b/app/soapbox/features/placeholder/components/placeholder_material_status.tsx @@ -0,0 +1,16 @@ +import React from 'react'; + +import PlaceholderStatus from './placeholder_status'; + +/** Fake material status to display while data is loading. */ +const PlaceholderMaterialStatus: React.FC = () => { + return ( +
+
+ +
+
+ ); +}; + +export default PlaceholderMaterialStatus; diff --git a/app/soapbox/features/placeholder/components/placeholder_notification.js b/app/soapbox/features/placeholder/components/placeholder_notification.tsx similarity index 94% rename from app/soapbox/features/placeholder/components/placeholder_notification.js rename to app/soapbox/features/placeholder/components/placeholder_notification.tsx index e56f90c588..bb99eeb5bd 100644 Binary files a/app/soapbox/features/placeholder/components/placeholder_notification.js and b/app/soapbox/features/placeholder/components/placeholder_notification.tsx differ diff --git a/app/soapbox/features/placeholder/components/placeholder_status.tsx b/app/soapbox/features/placeholder/components/placeholder_status.tsx index a11823f8a8..d67c41204b 100644 --- a/app/soapbox/features/placeholder/components/placeholder_status.tsx +++ b/app/soapbox/features/placeholder/components/placeholder_status.tsx @@ -9,7 +9,8 @@ interface IPlaceholderStatus { thread?: boolean } -const PlaceholderStatus = ({ thread = false }: IPlaceholderStatus) => ( +/** Fake status to display while data is loading. */ +const PlaceholderStatus: React.FC = ({ thread = false }) => (