From 428ce49b431e6ea14c413358c195de12e9c8ab67 Mon Sep 17 00:00:00 2001 From: r-southworth Date: Fri, 30 Aug 2024 17:59:51 -0400 Subject: [PATCH 1/8] convert to sever --- src/components/common/MobileProfileBtn.tsx | 1 + src/components/common/ProfileBtn.tsx | 6 +- src/components/common/cart/CartCard.tsx | 65 ++--- src/components/home/Home.tsx | 4 + src/components/home/HomeCard.tsx | 45 +--- src/components/posts/FullPostView.tsx | 277 ++++++++++++--------- src/components/posts/ViewCreatorPosts.tsx | 73 ++---- src/components/services/ResourcesMain.tsx | 8 + src/components/services/ViewCard.tsx | 112 ++++----- src/lib/imageHelper.tsx | 24 +- src/lib/types.ts | 13 +- src/pages/api/fetchFilterPosts.ts | 164 ++++++++++-- 12 files changed, 447 insertions(+), 345 deletions(-) diff --git a/src/components/common/MobileProfileBtn.tsx b/src/components/common/MobileProfileBtn.tsx index f715b00a..c2fc3296 100644 --- a/src/components/common/MobileProfileBtn.tsx +++ b/src/components/common/MobileProfileBtn.tsx @@ -15,6 +15,7 @@ const lang = getLangFromUrl(new URL(window.location.href)); const t = useTranslations(lang); const { data: User, error: UserError } = await supabase.auth.getSession(); + export const MobileProfileBtn = () => { const [isUser, setIsUser] = createSignal(false); diff --git a/src/components/common/ProfileBtn.tsx b/src/components/common/ProfileBtn.tsx index 7e896811..4213e52b 100644 --- a/src/components/common/ProfileBtn.tsx +++ b/src/components/common/ProfileBtn.tsx @@ -10,11 +10,11 @@ import { CreatorRegistrationRouting } from "../members/CreatorRegistrationRoutin import { LanguagePicker } from "./LanguagePicker"; import { getLangFromUrl, useTranslations } from "../../i18n/utils"; - const lang = getLangFromUrl(new URL(window.location.href)); const t = useTranslations(lang); const { data: User, error: UserError } = await supabase.auth.getSession(); + export const ProfileBtn = () => { const [isUser, setIsUser] = createSignal(false); @@ -74,11 +74,11 @@ export const ProfileBtn = () => {
+ id={grade.id.toString()} + aria-label={grade.grade} + class="gradeHomeSelectBtn" + onclick={(e) => selectGradeCarousel(e.target)} + > +

{grade.grade}

+ ))} {/*
@@ -266,38 +267,42 @@ export const HomeStickyFilters: Component = () => {
-
+

{t("formLabels.subjects")}