diff --git a/src/app/earthquakes/page.tsx b/src/app/earthquakes/page.tsx index 7a0ea80..5fbd35a 100644 --- a/src/app/earthquakes/page.tsx +++ b/src/app/earthquakes/page.tsx @@ -94,7 +94,7 @@ export default function Earthquakes() { const [searchModalOpen, setSearchModalOpen] = useState(false); // Fetch recent earthquakes as before - const { data, error, isLoading } = useSWR("/api/earthquakes", createPoster({ rangeDaysPrev: 5 })); + const { data, error, isLoading } = useSWR("/api/earthquakes", createPoster({ rangeDaysPrev: 10 })); // Prepare events for maps/sidebar const earthquakeEvents = useMemo( @@ -144,7 +144,7 @@ export default function Earthquakes() { setHoveredEventId={setHoveredEventId} button1Name="Log an Earthquake" button2Name="Search Earthquakes" - onButton2Click={() => setSearchModalOpen(true)} // <-- important! + onButton2Click={() => setSearchModalOpen(true)} /> -
-
- Background Image -
-
-
- Title Image -
-
-

-
- - Education Icon -

Earthquakes

-

- Log new earthquakes with their required details or search past seismic events -

- - - Research Icon -

Observatories

-

- Find recently active observatories, and newly opened/closed sites -

- - - Technology Icon -

Artefacts

-

- View or purchase recently discovered artefacts from seismic events -

- -
-

-
-
-
- Background Image -
-
-
-

- Welcome to Tremor Tracker -

-

- TremorTracker is a non-profit website and research company, that aims to provide true, reliable data. Our mission - is seismic education and preparation for all -

-

-

What is an earthquake?

-

- Earthquakes are a shaking of the earth's surface caused by a sudden release of energy underground. They can range - in size, from tiny trembles to large quakes, which can cause destruction and even tsunamis. Hundreds of - earthquakes happen every day—but most are too small to feel. -

-

-

- How do we log earthquakes? -

-

- What information are we interested in? -

-

info

-

-

- What are observatories? -

-

What is their role?

-

info

-
-
-
-
-

-
-

Recent Earthquake Events

-

- Learn about the most recent earthquake events from around the world: -

-
-

-
- {["Earthquake 1", "Earthquake 2", "Earthquake 3", "Earthquake 4", "Earthquake 5"].map((name) => ( -
-

{name}

-

-
- ))} -
-

-
-

Contact Information

-

- Learn about Tremor Tracker's mission, our team or contact us directly: -

-
-

-
- - Education Icon -

Contact us directly

-

- Visit our socials or leave us a message via phone or email. -

- - - Research Icon -

Our Mission

-

- Find out more about our purpose and the features we offer. -

- - - Technology Icon -

Meet the Team

-

- Learn about our team leads and their responsibilities. -

- -
-

-
-
-
- Background Image -
- -
-
- - ); + const { data, error, isLoading } = useSWR("/api/earthquakes", createPoster({ rangeDaysPrev: 6 })); + + // Take 5 most recent + const recents = (data?.earthquakes ?? []) + .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) + .slice(0, 5); + + return ( +
+
+
+ Background Image +
+
+
+ Title Image +
+
+

+
+ + Education Icon +

Earthquakes

+

+ Log new earthquakes with their required details or search past seismic events +

+ + + Research Icon +

Observatories

+

+ Find recently active observatories, and newly opened/closed sites +

+ + + Technology Icon +

Artefacts

+

+ View or purchase recently discovered artefacts from seismic events +

+ +
+

+
+
+
+ Background Image +
+
+
+

+ Welcome to Tremor Tracker +

+

+ TremorTracker is a non-profit website and research company, that aims to provide true, reliable data. Our mission + is seismic education and preparation for all +

+

+

What is an earthquake?

+

+ Earthquakes are a shaking of the earth's surface caused by a sudden release of energy underground. They can range + in size, from tiny trembles to large quakes, which can cause destruction and even tsunamis. Hundreds of + earthquakes happen every day—but most are too small to feel. +

+

+

+ How do we log earthquakes? +

+

+ What information are we interested in? +

+

info

+

+

+ What are observatories? +

+

What is their role?

+

info

+
+
+
+
+

+
+

+ Recent Earthquake Events +

+

+ Learn about the most recent earthquake events from around the world: +

+
+

+
+ {error && ( +
+

Failed to load earthquakes.

+
+ )} + {isLoading && ( +
+

Loading...

+
+ )} + {!isLoading && recents.length === 0 && ( +
+

No earthquakes found.

+
+ )} +
+ {recents.map((eq) => ( +
+
+
+ Earthquake in {eq.location || (eq.code && eq.code.split("-")[2])} +
+
+ {getRelativeDate(eq.date)} +
+
+ = 7 + ? "text-red-600 border-red-600" + : eq.magnitude >= 6 + ? "text-orange-500 border-orange-500" + : "text-yellow-500 border-yellow-500" + } + min-w-[2.8rem] min-h-[2.8rem] max-h-12 max-w-12`} + style={{ aspectRatio: "1 / 1" }} + title={`Magnitude ${eq.magnitude}`} + > + {eq.magnitude} + +
+ ))} +
+
+

+
+

+ Contact Information +

+

+ Learn about Tremor Tracker's mission, our team or contact us directly: +

+
+

+
+ + Education Icon +

Contact us directly

+

+ Visit our socials or leave us a message via phone or email. +

+ + + Research Icon +

Our Mission

+

+ Find out more about our purpose and the features we offer. +

+ + + Technology Icon +

Meet the Team

+

+ Learn about our team leads and their responsibilities. +

+ +
+

+
+
+
+ Background Image +
+ +
+
+
+ ); + // return ( //
diff --git a/src/databases/Users.csv b/src/databases/Users.csv new file mode 100644 index 0000000..2671d2d --- /dev/null +++ b/src/databases/Users.csv @@ -0,0 +1,21 @@ +name,email,password,level +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined +undefined,undefined,undefined,undefined \ No newline at end of file