From bd9fcb53a59b6ad4de0ebb83c0329f312d647b11 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Tue, 30 Apr 2024 09:38:48 -0700 Subject: [PATCH] run prettier and fix bug on safari --- src/app.css | 4 +- src/app.html | 22 ++++++++--- src/components/DirectionCard.svelte | 4 +- src/components/Footer.svelte | 8 ++-- src/lib/supabase.ts | 6 +-- src/lib/utils/retry.ts | 57 ++++++++++++++--------------- src/lib/utils/setImageUrl.ts | 17 ++++----- src/routes/approach/index.svelte | 6 +-- src/routes/contact/index.svelte | 46 +++++++++++++++++------ src/routes/index.svelte | 6 +-- src/routes/services/index.svelte | 18 +++++---- src/routes/team/index.svelte | 2 +- 12 files changed, 114 insertions(+), 82 deletions(-) diff --git a/src/app.css b/src/app.css index f7872d5..cd98343 100644 --- a/src/app.css +++ b/src/app.css @@ -1,7 +1,7 @@ a { - text-decoration: none; + text-decoration: none; } .border-darkish { - border-bottom: 1px dashed #666666; + border-bottom: 1px dashed #666666; } diff --git a/src/app.html b/src/app.html index f6420c2..78a884c 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - + @@ -7,14 +7,26 @@ Misty Mountains Therapy - - + + - + %svelte.head% - %svelte.body% + %svelte.body% diff --git a/src/components/DirectionCard.svelte b/src/components/DirectionCard.svelte index 71c9aba..0097d33 100644 --- a/src/components/DirectionCard.svelte +++ b/src/components/DirectionCard.svelte @@ -9,13 +9,13 @@
{imageSpec.alt}
-
+
{:else}
-
+
diff --git a/src/components/Footer.svelte b/src/components/Footer.svelte index 9588bc2..00d3e07 100644 --- a/src/components/Footer.svelte +++ b/src/components/Footer.svelte @@ -13,15 +13,15 @@
diff --git a/src/lib/supabase.ts b/src/lib/supabase.ts index 37c828f..dbd66ad 100644 --- a/src/lib/supabase.ts +++ b/src/lib/supabase.ts @@ -1,8 +1,8 @@ import { createClient } from '@supabase/supabase-js'; export const supabase = createClient( - import.meta.env.VITE_SUPABASE_URL as string, - import.meta.env.VITE_SUPABASE_ANON_KEY as string, + import.meta.env.VITE_SUPABASE_URL as string, + import.meta.env.VITE_SUPABASE_ANON_KEY as string ); -export default supabase; \ No newline at end of file +export default supabase; diff --git a/src/lib/utils/retry.ts b/src/lib/utils/retry.ts index 34bc73b..ed78528 100644 --- a/src/lib/utils/retry.ts +++ b/src/lib/utils/retry.ts @@ -9,37 +9,36 @@ export const RETRY_JITTER_MAX = 3_000; const waitFor = (ms: number) => new Promise((res) => setTimeout(res, ms)); const exponentialStrategyWithJitter: RetryStrategyF = (retries: number) => - WAIT_MS * Math.pow(RETRY_EXPONENT, RETRY_EXPONENTIAL_FACTOR * retries) + - RETRY_JITTER_MAX * Math.random(); + WAIT_MS * Math.pow(RETRY_EXPONENT, RETRY_EXPONENTIAL_FACTOR * retries) + + RETRY_JITTER_MAX * Math.random(); export const continueRetryUntilValidation = async ( - promiseFn: () => Promise | T | Promise | void, - validationFn: (x: T) => Promise | boolean = (x: T) => - Promise.resolve(!!x), - maxRetries = MAX_DEFAULT_RETRY_AMOUNT, - waitTimeStrategy: RetryStrategyF = exponentialStrategyWithJitter, - retries = 0, - lastError: undefined | unknown = undefined + promiseFn: () => Promise | T | Promise | void, + validationFn: (x: T) => Promise | boolean = (x: T) => Promise.resolve(!!x), + maxRetries = MAX_DEFAULT_RETRY_AMOUNT, + waitTimeStrategy: RetryStrategyF = exponentialStrategyWithJitter, + retries = 0, + lastError: undefined | unknown = undefined ): Promise => { - if (retries >= maxRetries) { - if (lastError) throw lastError; - throw new Error("Exceeded maximum retry amount"); - } - try { - if (retries) await waitFor(waitTimeStrategy(retries)); + if (retries >= maxRetries) { + if (lastError) throw lastError; + throw new Error('Exceeded maximum retry amount'); + } + try { + if (retries) await waitFor(waitTimeStrategy(retries)); - const res = await promiseFn(); - if (res && (await validationFn(res))) return res; + const res = await promiseFn(); + if (res && (await validationFn(res))) return res; - throw new Error("Validation predicate unsuccessful"); - } catch (e: unknown) { - return continueRetryUntilValidation( - promiseFn, - validationFn, - maxRetries, - waitTimeStrategy, - retries + 1, - e - ); - } -}; \ No newline at end of file + throw new Error('Validation predicate unsuccessful'); + } catch (e: unknown) { + return continueRetryUntilValidation( + promiseFn, + validationFn, + maxRetries, + waitTimeStrategy, + retries + 1, + e + ); + } +}; diff --git a/src/lib/utils/setImageUrl.ts b/src/lib/utils/setImageUrl.ts index 15566a8..d2db853 100644 --- a/src/lib/utils/setImageUrl.ts +++ b/src/lib/utils/setImageUrl.ts @@ -1,12 +1,11 @@ import { supabase } from '../supabase'; export const setImageUrl = (imageSpec) => { - const { publicURL, error } = supabase - .storage - .from('mistymountains') - .getPublicUrl(imageSpec.image); - if (!error) { - return { ...imageSpec, image: publicURL }; - } - return imageSpec; -} + const { publicURL, error } = supabase.storage + .from('mistymountains') + .getPublicUrl(imageSpec.image); + if (!error) { + return { ...imageSpec, image: publicURL }; + } + return imageSpec; +}; diff --git a/src/routes/approach/index.svelte b/src/routes/approach/index.svelte index 22819d3..90a0863 100644 --- a/src/routes/approach/index.svelte +++ b/src/routes/approach/index.svelte @@ -1,10 +1,10 @@
-

Our Approach

+

Our Approach.

- boats in water + boats in water

We meet each client where they are at and customize their therapeutic journey to best fit their personality and issues. Some of the approaches we use most are listed below:

@@ -38,6 +38,4 @@

We use this method to teach families how to treat and prevent behavioral and emotional problems in children and teens. We use a holistic approach and address concerns in the family, school, and community. We will not tell you how to parent, rather we will give you tools and ideas to manage misbehavior, set rules, encourage behavior you like, and take care of yourself so you can feel good and be confident in your parenting skills.

-
- diff --git a/src/routes/contact/index.svelte b/src/routes/contact/index.svelte index eaa1fea..f4439a1 100644 --- a/src/routes/contact/index.svelte +++ b/src/routes/contact/index.svelte @@ -69,9 +69,9 @@
-

Get in touch

+

Get in touch.

-
+ -
+

- For scheduling and other: (208) 499 - 4517 + Scheduling and Other +
+ (208) 499 - 4517

-
+

-

- For billing: billing@mistymountainstherapy.com -
- For other questions: jeffer@mistymountainstherapy.com -

+
+

+ Billing +
+ billing@mistymountainstherapy.com +

+

+ Inqueries +
+ contact@mistymountainstherapy.com +

+
note: please watch spam for replies
+


-

Or send us a message

+

Or send us a message.

@@ -130,7 +140,19 @@ />
+
note: please watch spam for any replies

-
+
+
+
+
+ We do not have a crisis line. If you or someone you know is in danger please call 911, visit + your nearest emergency room, call the National Suicide Prevention Lifeline for free crisis + counseling at (800)273-TALK (8255), or text HELLO to 741-741. +
+
+
+
+ diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 146dbb6..4c19676 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -39,7 +39,7 @@
-

Helping you conquer Mount Doom

+

Helping you conquer Mount Doom.

FREE 15 Minute Consultation

@@ -61,8 +61,8 @@ believe that therapy should be fun, engaging, and most importantly, useful to our clients.

- We are currently accepting new clients and offer a variety of services to help you live the - life you desire. To find the right fit for you, schedule a help you live the + life you desire. To find the right fit for you, schedule a free 15-minute consultation.

diff --git a/src/routes/services/index.svelte b/src/routes/services/index.svelte index 572b1ad..e6ac4de 100644 --- a/src/routes/services/index.svelte +++ b/src/routes/services/index.svelte @@ -3,28 +3,30 @@
-

Services

+

Our Services.

Therapy

+ We provide personalized, unassuming, and nonjudgemental guidance in the following:
  • Addiction
  • Adolescents
  • ADHD
  • +
  • Depression
  • Anxiety
  • Autism Spectrum
  • -
  • Couples
  • -
  • Depression
  • -
  • Families
  • +
  • LGBTQ+ Identity
  • Gender Identity
  • +
  • Couples
  • +
  • Families
  • +
  • Human Sexuality
  • Individuals
  • -
  • LGBTQ+
  • -
  • Roommates/Friends
  • -
  • Sexuality
  • -
  • And more
  • +
  • Friends / Roomates
  • +
  • And more

Screeners

+ We perform high quality screening for:
  • ADHD
  • Anxiety
  • diff --git a/src/routes/team/index.svelte b/src/routes/team/index.svelte index 88e5db0..8e29249 100644 --- a/src/routes/team/index.svelte +++ b/src/routes/team/index.svelte @@ -20,7 +20,7 @@
    -

    Our Team

    +

    Our Team.

    {#if people.length} {#each people as person, i}