Skip to content

(Feature) Newsletter #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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