Sheetal - reddit auto poster frontend#4478
Sheetal - reddit auto poster frontend#4478sheetalmangate wants to merge 7 commits intodevelopmentfrom
Conversation
…odNetworkApp into sheetal-reddit-auto-poster-frontend updating local branch
…odNetworkApp into sheetal-reddit-auto-poster-frontend taking update from remote branch
…odNetworkApp into sheetal-reddit-auto-poster-frontend updating local repo
❌ Deploy Preview for highestgoodnetwork-dev failed.
|
|
| import SubmitPost from './SubmitPost'; | ||
|
|
||
| export default function RedditPanel() { | ||
| const [hasToken, setHasToken] = useState(false); |
There was a problem hiding this comment.
Currently hasToken initializes as false, which means authenticated users will briefly see the "Connect to Reddit" button while the token validation request is in progress. Consider using null as a third state to represent loading, so nothing renders until the validation is complete.
| const res = await axios.get(`${ENDPOINTS.AP_REDDIT_AUTH_TOKEN}`); | ||
| setHasToken(res.data.exists); | ||
| } catch (error) { | ||
| setHasToken(false); |
There was a problem hiding this comment.
Currently if the token validation request fails, the catch block silently sets hasToken to false, which means a network error looks exactly the same as "not connected" to the user. Worth adding a separate error state so we can show something more helpful in that case rather than just defaulting to the connect button.
|
Tested the changes at http://localhost:5173 as an Owner. I can see the Reddit tab under Other Links -> Send Emails, but I'm unable to test the full functionality as Reddit is currently denying new 'API Access' registrations for developer apps. Without a CLIENT_ID, the tab remains in a persistent loading state. Any suggestions for an alternative way to test this without requiring individual Reddit API keys would be helpful. |
I tested the changes locally at http://localhost:5173 as an Owner and confirmed that the Reddit tab appears under Other Links → Send Emails. However, I couldn’t fully verify its functionality because Reddit is currently restricting new API access registrations, leaving the feature stuck in a loading state without a valid CLIENT_ID. |
rajanidi1999
left a comment
There was a problem hiding this comment.
I verified the Reddit tab appears correctly under Other Links → Send Emails, but full functionality couldn’t be tested due to Reddit API access restrictions (missing CLIENT_ID causes a persistent loading state). Additionally, the current error handling needs improvement network failures during token validation are treated the same as a “not connected” state, which can mislead users. A separate error state should be introduced to provide clearer feedback.






Description
Implements the frontend interface for the Reddit Auto Poster feature. This update adds a basic UI for creating Reddit text and link posts, scheduling posts for future publication, and managing scheduled jobs (view and cancel). The component is currently placed under the Announcements section for testing purposes. This feature is not yet styled for production and is intended for internal review and testing only.
Related PRS (if any):
This frontend PR is related to the #1928 backend PR.
To test this backend PR you need to checkout the #1928 frontend PR.
…
Main changes explained:
https://www.reddit.com/prefs/apps
-- While creating app in reddit use below link as redirect url
http://localhost:5173/announcements/platforms/reddit/redirect
…
How to test:
yarn installandyarn start:localto run this PR locallyScreenshots or videos of changes:
Autoposter_work_flow.mp4