File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed
Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,20 @@ export const load: PageServerLoad = async ({ locals }) => {
7575 const allPointsEarned = Number ( allPointsEarnedResult [ 0 ] ?. total_points ?? 0 ) ;
7676 const allAttendanceCount = Number ( allAttendanceCountResult [ 0 ] ?. count ?? 0 ) ;
7777
78+ const nameGreetings = [
79+ "Hey there, " ,
80+ "Welcome back, " ,
81+ "Good to see you, " ,
82+ "Hello, " ,
83+ "Hi there, " ,
84+ "Howdy, " ,
85+ "What's up, " ,
86+ "Ahoy, " ,
87+ "Today's a good day, " ,
88+ ] ;
89+
7890 return {
91+ greeting : nameGreetings [ Math . floor ( Math . random ( ) * nameGreetings . length ) ] ,
7992 upcomingEvents,
8093 uniqueClubsHostingEvents,
8194 eventsHostedSemester,
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import Countup from " $lib/components/countup.svelte" ;
32 import * as Card from " $lib/components/ui/card/index" ;
43 import type { PageProps } from " ./$types" ;
54
65 const { data }: PageProps = $props ();
76 const {
7+ greeting,
88 user,
99 userClub,
1010 upcomingEvents,
1818 } = data ;
1919
2020 const theDay: string = new Date ().toLocaleDateString (" en-US" , { weekday: " long" });
21- const nameGreetings = [
22- " Hey there, " ,
23- " Welcome back, " ,
24- " Good to see you, " ,
25- " Hello, " ,
26- " Hi there, " ,
27- " Howdy, " ,
28- " What's up, " ,
29- " Ahoy, " ,
30- " Today's a good day, " ,
31- ];
32- const randomNum = Math .floor (Math .random () * nameGreetings .length );
3321 </script >
3422
3523<div >
3624 <div class =" flex items-center justify-center pt-20" >
3725 <div class =" text-center" >
38- <h1 class ="text-4xl font-bold" >{nameGreetings [ randomNum ] }{user .name }.</h1 >
26+ <h1 class ="text-4xl font-bold" >{greeting }{user .name }.</h1 >
3927 <h2 class ="text-xl" >Today is {theDay }. What's next?</h2 >
4028 </div >
4129 </div >
You can’t perform that action at this time.
0 commit comments