Skip to content

Commit

Permalink
installed axios for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
eelkus01 committed Jun 5, 2024
1 parent 52c4aba commit cf29851
Show file tree
Hide file tree
Showing 144 changed files with 30,325 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client/src/pages/upcomingElections/electionDates.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
import {useEffect, useState} from 'react'


export default function ElectionDates() {

useEffect(() => {
async function fetchData() {
try {
const response = await fetch('http://localhost:3100'); // Replace with your API endpoint
if (!response.ok) {
throw new Error('Network response was not ok' + response.statusText);
}
const data = await response.json();
console.log(data); // Do something with the fetched data
} catch (error) {
console.error('There has been a problem with your fetch operation:', error);
}
}
fetchData();
}, [] )

return (
<div className='bg-gray-100 m-4 rounded-xl grid grid-cols-2 p-4 max-w-lg align-center'>
<p className="font-semibold text-red-500 m-2 text-center ">SEPT 2 @ 5PM</p>
Expand Down
71 changes: 71 additions & 0 deletions server/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions server/node_modules/asynckit/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

233 changes: 233 additions & 0 deletions server/node_modules/asynckit/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cf29851

Please sign in to comment.