Skip to content

Commit 7fd2b65

Browse files
authored
Merge pull request #50 from whysosaket/main
(Feature) Newsletter
2 parents 1c94c4e + 19a73e3 commit 7fd2b65

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Diff for: my-app/src/App.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import Home from "./pages/Home";
55
import About from "./pages/About";
66
import NotFound from "./pages/404";
77
import Community from "./pages/Community";
8-
import ContactForm from "./pages/Contact";
98
import Events from "./pages/Events";
109
import Base from "./layouts/Base";
1110
import Subscribe from "./components/Subscribe";
1211
import Loader from "./components/Loader";
12+
import NewsletterPage from "./pages/NewsletterPage";
1313

1414
// Custom hook to handle the loader
1515
const useLoader = (duration = 1500) => {
@@ -43,7 +43,8 @@ export default function App() {
4343
<Route path="/about-us" element={<About handle={setVisible} />} />
4444
<Route path="/community" element={<Community />} />
4545
<Route path="/events" element={<Events />} />
46-
<Route path="/contact-us" element={<ContactForm />} />
46+
{/* <Route path="/contact-us" element={<ContactForm />} /> */}
47+
<Route path="/newsletter" element={<NewsletterPage handle={setVisible} />} />
4748
<Route path="*" element={<NotFound />} />
4849
</Routes>
4950
</Base>

Diff for: my-app/src/data.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const navigation = [
22
{ name: "Home", to: "/" },
33
{ name: "Community", to: "/community" },
44
{ name: "Events", to: "/events" },
5-
// { name: "Newsletter", to: "/newsletter" },
5+
{ name: "Newsletter", to: "/newsletter" },
66
{ name: "About us", to: "about-us" },
7-
{ name: "Contact us", to: "/contact-us" },
7+
// { name: "Contact us", to: "/contact-us" },
88
];
99
export { navigation };

Diff for: my-app/src/pages/NewsletterPage.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/b
1515
const maxWidth = 800;
1616
const resizeObserverOptions = {};
1717

18-
const NewsletterPage = () => {
18+
const NewsletterPage = (props) => {
1919
const [file, setFile] = useState();
2020
const [editions, setEditions] = useState([]);
2121
const [numPages, setNumPages] = useState();
@@ -181,7 +181,7 @@ const NewsletterPage = () => {
181181
</div>
182182
</div>}
183183
<div className="my-6">
184-
<Newsletter />
184+
<Newsletter handle={props.handle} />
185185
</div>
186186
</div>
187187
);

0 commit comments

Comments
 (0)