From 38cd7386ff475224fcead0a8e55de22cf6e8f4b4 Mon Sep 17 00:00:00 2001 From: Atef Ben Ali Date: Sun, 25 Jul 2021 13:23:34 +0100 Subject: [PATCH 1/3] fix: edit `cors proxy` url in `app` component --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index cdfec73..05630f6 100755 --- a/src/App.js +++ b/src/App.js @@ -32,7 +32,7 @@ const App = ({ fetching }) => { }, }); - const CORS_PROXY = "https://cors-anywhere.herokuapp.com/"; + const CORS_PROXY = "https://cors.bridged.cc/"; if (feed_url) { const loadRSS = async () => { From af92d2ee2faf1adfdbccbf6ad530f1065619b629 Mon Sep 17 00:00:00 2001 From: Atef Ben Ali Date: Sun, 25 Jul 2021 13:39:28 +0100 Subject: [PATCH 2/3] style: format --- src/App.js | 6 +++--- src/components/SearchHistory.jsx | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 05630f6..a5cf8a3 100755 --- a/src/App.js +++ b/src/App.js @@ -8,11 +8,12 @@ import { DialogTitle, } from "@material-ui/core"; -import "./App.css"; import EpisodeList from "./components/EpisodeList"; import UserForm from "./components/UserForm"; import LoadingStatus from "./components/LoadingStatus"; +import "./App.css"; + const App = ({ fetching }) => { const [fetched, setFetched] = useState({}); const [onFetching, setFetching] = useState(false); @@ -22,8 +23,7 @@ const App = ({ fetching }) => { const getFeed = (event) => { setFetching((prev) => !prev); - if (event.preventDefault != null) - event.preventDefault(); + if (event.preventDefault != null) event.preventDefault(); const feed_url = event.target.elements.feed_url.value; const Parser = require("rss-parser"); const parser = new Parser({ diff --git a/src/components/SearchHistory.jsx b/src/components/SearchHistory.jsx index 1856814..6473966 100644 --- a/src/components/SearchHistory.jsx +++ b/src/components/SearchHistory.jsx @@ -9,8 +9,12 @@ export default function SearchHistory(props) { }; const handleClose = (event) => { - if (event.currentTarget.innerText != '') - props.getFeed({target: {elements: {feed_url: {value: event.currentTarget.innerText}}}}); + if (event.currentTarget.innerText !== "") + props.getFeed({ + target: { + elements: { feed_url: { value: event.currentTarget.innerText } }, + }, + }); setAnchorEl(null); }; From c7d23211c6955654c2aa50d7caff8ca7fcca1186 Mon Sep 17 00:00:00 2001 From: Atef Ben Ali Date: Sun, 25 Jul 2021 14:16:53 +0100 Subject: [PATCH 3/3] chore: clean-up --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index a5cf8a3..03d6a95 100755 --- a/src/App.js +++ b/src/App.js @@ -101,8 +101,8 @@ const App = ({ fetching }) => { past={past} previous_feeds={[...previousFeeds]} /> - {error ? renderAlert() :
} - {!past ?

Please enter an RSS feed

:
} + {error ? renderAlert() : null} + {!past ?

Please enter an RSS feed

: null}