Advertisement
Guest User

Untitled

a guest
Apr 16th, 2025
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. "use client";
  2.  
  3. import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
  4. import { CircularProgress } from "@/components/circular-progress";
  5. import { Icons } from "@/components/icons";
  6. import { useEffect, useState } from "react";
  7. import Link from 'next/link';
  8.  
  9. const strideElements = [
  10. {
  11. id: "set-high-goals",
  12. name: "Set High Goals",
  13. description: "Define ambitious objectives and create a roadmap for success.",
  14. icon: Icons.arrowRight,
  15. color: "var(--chart-1)",
  16. href: '/reflect/set-high-goals',
  17. },
  18. {
  19. id: "take-part-and-engage",
  20. name: "Take Part and Engage",
  21. description: "Actively participate in activities and build meaningful connections.",
  22. icon: Icons.arrowRight,
  23. color: "var(--chart-2)",
  24. },
  25. {
  26. id: "remain-curious-and-stay-focused",
  27. name: "Remain Curious and Stay Focused",
  28. description: "Cultivate a thirst for knowledge and maintain concentration.",
  29. icon: Icons.arrowRight,
  30. color: "var(--chart-3)",
  31. },
  32. {
  33. id: "initiate-and-explore",
  34. name: "Initiate and Explore",
  35. description: "Take initiative and venture into uncharted territories.",
  36. icon: Icons.arrowRight,
  37. color: "var(--chart-4)",
  38. },
  39. {
  40. id: "drive-forward",
  41. name: "Drive Forward",
  42. description: "Maintain momentum and persevere through challenges.",
  43. icon: Icons.arrowRight,
  44. color: "var(--chart-5)",
  45. },
  46. {
  47. id: "empower-and-seek-support",
  48. name: "Empower and Seek Support",
  49. description: "Lift others and seek guidance when needed.",
  50. icon: Icons.arrowRight,
  51. color: "var(--primary)",
  52. },
  53. ];
  54.  
  55. export default function Home() {
  56. const [progress, setProgress] = useState<{ [key: string]: number }>({});
  57.  
  58. useEffect(() => {
  59. // Simulate loading progress from Firestore.
  60. const initialProgress = strideElements.reduce((acc, element) => {
  61. acc[element.id] = Math.floor(Math.random() * 101);
  62. return acc;
  63. }, {});
  64. setProgress(initialProgress);
  65. }, []);
  66.  
  67. return (
  68. <div className="flex flex-col items-center justify-center min-h-screen p-4">
  69. <h1 className="text-2xl font-semibold mb-4">STRIDE Wheel</h1>
  70. <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
  71. {strideElements.map((element) => (
  72. <Card key={element.id}>
  73. <CardHeader>
  74. <CardTitle className="flex items-center">
  75. {element.name}
  76. <span className="ml-2">
  77. {element.icon && <element.icon />}
  78. </span>
  79. </CardTitle>
  80. <CardDescription>{element.description}</CardDescription>
  81. </CardHeader>
  82. <CardContent className="flex flex-col items-center">
  83. <CircularProgress
  84. value={progress[element.id] || 0}
  85. size={100}
  86. color={element.color}
  87. />
  88. <p className="text-sm mt-2">
  89. {progress[element.id] || 0}% Complete
  90. </p>
  91. {element.href && (
  92. <Link href={element.href} className="mt-2">
  93. Reflect
  94. </Link>
  95. )}
  96. </CardContent>
  97. </Card>
  98. ))}
  99. </div>
  100. </div>
  101. );
  102. }
  103.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement