mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Working database interactions and NUI callbacks
This commit is contained in:
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;
|
||||
Reference in new issue
Block a user