Working database interactions and NUI callbacks

This commit is contained in:
erik-sn committed 2020-09-24 23:25:35 -04:00
1 parent 1e900baab9
commit ba0f122938
19 files changed
+372 -127

No files matched your search

@@ -0,0 +1,23 @@
import React, { useEffect } from "react";
import { useRecoilState } from "recoil";
import { useTranslation } from "react-i18next";
import { useTweetStatus } from "../hooks/useTweetStatus";
const HIDE_SUCCESS_TIMEOUT = 5000;
function AddTweetStatus() {
const { isSuccessful } = useTweetStatus();
const { t } = useTranslation();
console.log(isSuccessful);
// on the "true" case the tweet was created and the user should
// see their tweet at the top of the list, so there's no need
// to directly prompt them that it was successful.
if (isSuccessful === null || isSuccessful === true) return null;
return <div>{t("APPS_TWITTER_CREATE_FAILED")}</div>;
}
export default AddTweetStatus;