Skip to content

Commit

Permalink
(Feature) Newsletter
Browse files Browse the repository at this point in the history
  • Loading branch information
whysosaket committed Oct 21, 2024
1 parent 1c94c4e commit 19a73e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions my-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import Home from "./pages/Home";
import About from "./pages/About";
import NotFound from "./pages/404";
import Community from "./pages/Community";
import ContactForm from "./pages/Contact";
import Events from "./pages/Events";
import Base from "./layouts/Base";
import Subscribe from "./components/Subscribe";
import Loader from "./components/Loader";
import NewsletterPage from "./pages/NewsletterPage";

// Custom hook to handle the loader
const useLoader = (duration = 1500) => {
Expand Down Expand Up @@ -43,7 +43,8 @@ export default function App() {
<Route path="/about-us" element={<About handle={setVisible} />} />
<Route path="/community" element={<Community />} />
<Route path="/events" element={<Events />} />
<Route path="/contact-us" element={<ContactForm />} />
{/* <Route path="/contact-us" element={<ContactForm />} /> */}
<Route path="/newsletter" element={<NewsletterPage handle={setVisible} />} />
<Route path="*" element={<NotFound />} />
</Routes>
</Base>
Expand Down
4 changes: 2 additions & 2 deletions my-app/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const navigation = [
{ name: "Home", to: "/" },
{ name: "Community", to: "/community" },
{ name: "Events", to: "/events" },
// { name: "Newsletter", to: "/newsletter" },
{ name: "Newsletter", to: "/newsletter" },
{ name: "About us", to: "about-us" },
{ name: "Contact us", to: "/contact-us" },
// { name: "Contact us", to: "/contact-us" },
];
export { navigation };
4 changes: 2 additions & 2 deletions my-app/src/pages/NewsletterPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/b
const maxWidth = 800;
const resizeObserverOptions = {};

const NewsletterPage = () => {
const NewsletterPage = (props) => {
const [file, setFile] = useState();
const [editions, setEditions] = useState([]);
const [numPages, setNumPages] = useState();
Expand Down Expand Up @@ -181,7 +181,7 @@ const NewsletterPage = () => {
</div>
</div>}
<div className="my-6">
<Newsletter />
<Newsletter handle={props.handle} />
</div>
</div>
);
Expand Down

0 comments on commit 19a73e3

Please sign in to comment.