Skip to content

Commit

Permalink
Fixed id param for useCustomTweetExtended
Browse files Browse the repository at this point in the history
  • Loading branch information
LuD1161 committed Sep 27, 2020
1 parent 759949d commit 1e291a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Twitter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ interface PropsType {

export const Twitter = (props: PropsType) => {
const {
id,
language,
onHashTagPress,
onLinkPress,
Expand All @@ -49,6 +48,7 @@ export const Twitter = (props: PropsType) => {
onTweetPress,
useCustomTweetExtendedData,
} = props;
var id = props.id;
const appearance = darkMode ? "dark" : "light";
const [data, setData] = React.useState<ITwitterPost | null>(null);
React.useEffect(() => {
Expand All @@ -63,6 +63,9 @@ export const Twitter = (props: PropsType) => {
if (!data) {
return null;
}
if (useCustomTweetExtendedData) {
id = useCustomTweetExtendedData.id_str;
}
const styles = evaluateTheme(appearance);

return (
Expand Down

0 comments on commit 1e291a5

Please sign in to comment.