From 47ade5dca96d814628f59eb8deabd44f4c40d203 Mon Sep 17 00:00:00 2001 From: GamerBoss101 Date: Sun, 13 Apr 2025 00:21:45 -0400 Subject: [PATCH] Guide Page Update --- src/app/(app)/guide/Info.tsx | 151 ++++++++++++++++++ .../page.tsx => guide/PointGuide.tsx} | 13 +- src/app/(app)/guide/page.tsx | 41 +++++ src/app/(app)/info/page.tsx | 146 ----------------- src/lib/components/MobileNav.jsx | 9 +- src/lib/components/NavBar.tsx | 7 +- src/lib/css/globals.css | 2 +- 7 files changed, 207 insertions(+), 162 deletions(-) create mode 100644 src/app/(app)/guide/Info.tsx rename src/app/(app)/{pointsguide/page.tsx => guide/PointGuide.tsx} (96%) create mode 100644 src/app/(app)/guide/page.tsx delete mode 100644 src/app/(app)/info/page.tsx diff --git a/src/app/(app)/guide/Info.tsx b/src/app/(app)/guide/Info.tsx new file mode 100644 index 0000000..400522a --- /dev/null +++ b/src/app/(app)/guide/Info.tsx @@ -0,0 +1,151 @@ +"use client"; + +import React from "react"; + +const InfoContent = () => { + + return ( +
+

+ Beverage Consumption Info! +

+

+ Learn what's best for your body and how to earn points and win! Making + informed drink choices supports hydration, energy regulation, and + overall health. Below are basic guidelines based on established public + health recommendations. +

+ +
+

+ Water +

+
    +
  • + The recommended daily fluid intake is approximately 2.7 liters for + women and 3.7 liters for men. This app suggest at least 100oz per + day! +
  • +
  • Water contains no calories, sugar, or caffeine.
  • +
  • Helps with focus, digestion, and temperature regulation.
  • +
+

+ Carry a refillable water bottle to stay hydrated. Drinking water will + earn you the most points! +

+
+ +
+

+ Caffeine +

+
    +
  • + The maximum recommended daily caffeine intake for most healthy + adults is 400 mg. +
  • +
  • + Excessive caffeine consumption can cause elevated heart rate, + insomnia, anxiety, and headaches. +
  • +
  • + Caffeine content in common drinks: +
      +
    • Celsius (can): 200–270 mg
    • +
    • Brewed coffee (8 oz): ~95 mg
    • +
    • Coca-Cola (12 oz): ~34 mg
    • +
    • Bottle of Mountain Dew: 91-98 mg
    • +
    +
  • +
+

+ Exceeding the 400 mg daily limit will result in no points awarded for + additional caffeinated drinks that day! +

+
+ +
+

+ Added Sugar Drinks +

+
    +
  • + The American Heart Association recommends limiting added sugar + intake to 25 grams per day for women and 36 grams per day for men +
  • +
  • + High sugar intake is associated with increased risk of obesity, + diabetes, and heart disease! +
  • +
  • + Added sugar is commonly found in sodas, energy drinks, sweetened + teas, and flavored waters. +
  • +
  • + Sugar content in common drinks: +
      +
    • Monster Energy (16 oz): 54g
    • +
    • Bottled sweet tea: 25–30g
    • +
    • Vitaminwater (20 oz): 27g
    • +
    • Coca-Cola (12 oz): 39g
    • +
    +
  • +
+

+ Surpassing the daily sugar limit will result in zero points awarded + for any further drink entries for that day! +

+
+ +
+

+ Juice and Flavored Drinks +

+
    +
  • + 100% fruit juice contains essential vitamins but also high amounts + of natural sugar and lacks dietary fiber. +
  • +
  • + Many flavored drinks marketed as “healthy” contain significant added + sugar. +
  • +
  • + Look for “unsweetened” or “no added sugar” labels to minimize sugar + intake! Whole fruits are preferable over fruit juice! +
  • +
+

+ These drinks still count to the daily sugar intake but you’ll earn + more points with juice than most other drinks! +

+
+ +
+

+ Milk and Milk Alternatives +

+
    +
  • + Dairy and fortified plant-based milks (such as almond, soy, or oat) + provide calcium, vitamin D, and protein! +
  • +
  • Choose unsweetened, low-fat, or fat-free options!
  • +
  • + Flavored varieties (ex. chocolate or vanilla) often contain added + sugars and should be consumed in moderation. +
  • +
+

+ Unsweetened/regular milk or milk alternatives can allow you to gain + more points! +

+
+ +
+
+
+ ); +}; + +export default InfoContent; diff --git a/src/app/(app)/pointsguide/page.tsx b/src/app/(app)/guide/PointGuide.tsx similarity index 96% rename from src/app/(app)/pointsguide/page.tsx rename to src/app/(app)/guide/PointGuide.tsx index 86956cb..4d3c87c 100644 --- a/src/app/(app)/pointsguide/page.tsx +++ b/src/app/(app)/guide/PointGuide.tsx @@ -1,5 +1,7 @@ "use client"; +import React from "react"; + const tableData = [ { drink: "Water", @@ -51,8 +53,9 @@ const tableData = [ }, ]; -export default function PointsGuidePage() { - return ( +const PointGuide = () => { + + return (

Points Guide @@ -110,5 +113,7 @@ export default function PointsGuidePage() {

- ); -} + ); +}; + +export default PointGuide; diff --git a/src/app/(app)/guide/page.tsx b/src/app/(app)/guide/page.tsx new file mode 100644 index 0000000..7224ec6 --- /dev/null +++ b/src/app/(app)/guide/page.tsx @@ -0,0 +1,41 @@ +"use client"; + +import { useState } from "react"; +import InfoContent from "./Info"; +import PointGuide from "./PointGuide"; + +export default function InfoPage() { + const [activeComponent, setActiveComponent] = useState<"info" | "points">("info"); + + return ( +
+
+ + +
+ +
+ {activeComponent === "info" && } + {activeComponent === "points" && } +
+
+ ); +} diff --git a/src/app/(app)/info/page.tsx b/src/app/(app)/info/page.tsx deleted file mode 100644 index 16e45ea..0000000 --- a/src/app/(app)/info/page.tsx +++ /dev/null @@ -1,146 +0,0 @@ -"use client"; - -export default function InfoPage() { - return ( -
-

- Beverage Consumption Info! -

-

- Learn what's best for your body and how to earn points and win! Making - informed drink choices supports hydration, energy regulation, and - overall health. Below are basic guidelines based on established public - health recommendations. -

- -
-

- Water -

-
    -
  • - The recommended daily fluid intake is approximately 2.7 liters for - women and 3.7 liters for men. This app suggest at least 100oz per - day! -
  • -
  • Water contains no calories, sugar, or caffeine.
  • -
  • Helps with focus, digestion, and temperature regulation.
  • -
-

- Carry a refillable water bottle to stay hydrated. Drinking water will - earn you the most points! -

-
- -
-

- Caffeine -

-
    -
  • - The maximum recommended daily caffeine intake for most healthy - adults is 400 mg. -
  • -
  • - Excessive caffeine consumption can cause elevated heart rate, - insomnia, anxiety, and headaches. -
  • -
  • - Caffeine content in common drinks: -
      -
    • Celsius (can): 200–270 mg
    • -
    • Brewed coffee (8 oz): ~95 mg
    • -
    • Coca-Cola (12 oz): ~34 mg
    • -
    • Bottle of Mountain Dew: 91-98 mg
    • -
    -
  • -
-

- Exceeding the 400 mg daily limit will result in no points awarded for - additional caffeinated drinks that day! -

-
- -
-

- Added Sugar Drinks -

-
    -
  • - The American Heart Association recommends limiting added sugar - intake to 25 grams per day for women and 36 grams per day for men -
  • -
  • - High sugar intake is associated with increased risk of obesity, - diabetes, and heart disease! -
  • -
  • - Added sugar is commonly found in sodas, energy drinks, sweetened - teas, and flavored waters. -
  • -
  • - Sugar content in common drinks: -
      -
    • Monster Energy (16 oz): 54g
    • -
    • Bottled sweet tea: 25–30g
    • -
    • Vitaminwater (20 oz): 27g
    • -
    • Coca-Cola (12 oz): 39g
    • -
    -
  • -
-

- Surpassing the daily sugar limit will result in zero points awarded - for any further drink entries for that day! -

-
- -
-

- Juice and Flavored Drinks -

-
    -
  • - 100% fruit juice contains essential vitamins but also high amounts - of natural sugar and lacks dietary fiber. -
  • -
  • - Many flavored drinks marketed as “healthy” contain significant added - sugar. -
  • -
  • - Look for “unsweetened” or “no added sugar” labels to minimize sugar - intake! Whole fruits are preferable over fruit juice! -
  • -
-

- These drinks still count to the daily sugar intake but you’ll earn - more points with juice than most other drinks! -

-
- -
-

- Milk and Milk Alternatives -

-
    -
  • - Dairy and fortified plant-based milks (such as almond, soy, or oat) - provide calcium, vitamin D, and protein! -
  • -
  • Choose unsweetened, low-fat, or fat-free options!
  • -
  • - Flavored varieties (ex. chocolate or vanilla) often contain added - sugars and should be consumed in moderation. -
  • -
-

- Unsweetened/regular milk or milk alternatives can allow you to gain - more points! -

-
- -
-
-
- ); -} diff --git a/src/lib/components/MobileNav.jsx b/src/lib/components/MobileNav.jsx index 47adace..c37f8cb 100644 --- a/src/lib/components/MobileNav.jsx +++ b/src/lib/components/MobileNav.jsx @@ -18,17 +18,14 @@ const MobileNav = () => { return (
- + - + - - - {isAuthenticated ? ( - + ) : null} diff --git a/src/lib/components/NavBar.tsx b/src/lib/components/NavBar.tsx index 402ce34..24365d9 100644 --- a/src/lib/components/NavBar.tsx +++ b/src/lib/components/NavBar.tsx @@ -26,11 +26,8 @@ const NavBar = () => {
diff --git a/src/lib/css/globals.css b/src/lib/css/globals.css index 5ada454..83bf848 100644 --- a/src/lib/css/globals.css +++ b/src/lib/css/globals.css @@ -28,4 +28,4 @@ body { background-position: center; height: 100vh; @apply dark:bg-[url('/darkmodebackground.png')] bg-[url('/lightmodebackground.png')]; -} \ No newline at end of file +}