From fe6b4eb7f2a4dddf841a279fd57d31a1a24e977b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Mon, 2 May 2022 13:51:50 +0200 Subject: [PATCH 01/12] Update perils mock data --- .../Perils/PerilItem/PerilItem.stories.tsx | 6 +- src/components/Perils/perilMockData/brf.tsx | 1054 +++++------------ .../Perils/perilMockData/multiplePromises.tsx | 769 ++++++++++++ src/components/Perils/types.ts | 6 + 4 files changed, 1105 insertions(+), 730 deletions(-) create mode 100644 src/components/Perils/perilMockData/multiplePromises.tsx diff --git a/src/components/Perils/PerilItem/PerilItem.stories.tsx b/src/components/Perils/PerilItem/PerilItem.stories.tsx index a6e818ca..b91402d6 100644 --- a/src/components/Perils/PerilItem/PerilItem.stories.tsx +++ b/src/components/Perils/PerilItem/PerilItem.stories.tsx @@ -14,14 +14,14 @@ export default { }, } -const perilProps = brfPerils[1] +const peril = brfPerils[0].items[0] export const Default = () => (
diff --git a/src/components/Perils/perilMockData/brf.tsx b/src/components/Perils/perilMockData/brf.tsx index faab76a1..21b8ec57 100644 --- a/src/components/Perils/perilMockData/brf.tsx +++ b/src/components/Perils/perilMockData/brf.tsx @@ -1,758 +1,358 @@ -import { Peril } from '../types' +import { PerilsCollection } from '../types' -export const brfPerils: Peril[] = [ +export const brfPerils: PerilsCollection[] = [ { - title: 'Eldsvåda', - info: 'Var försiktig med levande ljus eller eld.', - covered: [ - 'Eld som har brunnit med öppen låga (inte enbart glöd- eller svedskada)', - 'Explosion', - 'Plötslig skada av sot', - 'Blixt', - 'Frätande gas som bildats vid oavsiktlig upphettning av plast', - 'Sanering av sot orsakad av öppen låga', - ], - exceptions: ['Sprängningsarbete, sot eller levande ljus'], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/fire_dark.svg', - }, - light: { - svgUrl: '/app-content-service/fire.svg', - }, - }, - }, - }, - { - title: 'Vattenläcka', - info: - 'Se till att kranar är täta och stängda när de inte används. Lägg underlägg under kyl/frys/ diskmaskin som samlar upp vatten. Se till att ledningssystem och anslutna anordningar inte fryser sönder. Och lämnar du lägenheten i mer än 7 dagar så måste vattnet stängas av helt.', - covered: [ - 'Oberäknat vatten/ånga från vattenledningssytem', - 'Oberäknat vatten/ånga från badrum, kök eller tvättstuga', - 'Oberäknat vatten/ånga från värmepanna', - 'Läckage från kyl/frys', - 'Läckage från brandsläckare', - 'Läckage från tvättställ', - 'Läckage från akvarie', - ], - exceptions: [ - 'Yt-och tätskikt installerats utan behörig installatör', - 'Skada på det föremål som har läckt', - 'Skada orsakat av takränna eller utvändigt stuprör', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/water_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/water_damage.svg', - }, - }, - }, - }, - { - title: 'Inbrott', - info: - 'Lås ytterdörrar och regla fönster när ingen är hemma. Och märk inte dina nycklar så att folk förstår vart du bor eller vart de går.', - covered: [ - 'Allt du äger i din lägenhet till ett värde upp till 1 miljon kronor', - 'Inbrott och skadegörelse i din bostadsrätt inklusive. vind/källare', - ], - exceptions: [ - 'Stöld av pengar, värdehandlingar och stöldbegärlig egendom (smycken, mobiltelefoner, datorer och allt annat dyrt) ifrån vind eller källarförråd eller ur bil', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/burglary_dark.svg', - }, - light: { - svgUrl: '/app-content-service/burglary.svg', - }, - }, - }, - }, - { - title: 'Stöld', - info: - 'Ha alltid uppsikt över dina saker. Lämna inte värdesaker på t.ex. ett bord på ett café. Lås alltid bilen om du förvarar saker där och stöldbegärlig egendom (smycke, dator) ska alltid döljas. Och lås alltid din cykel.', - covered: [ - 'Stöld och skadegörelse i ditt hem', - 'Stöld ur gemensamhetsutrymme, t.ex. cykel- eller barnvagnsförråd', - 'Stöld och skadegörelse av saker du tar med dig till ditt arbete eller hotellrum', - 'Stöld och skadegörelse vid förvaring hos t.ex. Shurguard', - 'Stöld utanför bostaden', - 'Stöld ur bil när du är på resa', - ], - exceptions: [ - 'För vissa typer av saker, t.ex. pengar, hemelektronik, mobiltelefoner, datorer, kameror, sprit och smycken gäller speciella regler beroende på var stölden inträffat.', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/theft_dark.svg', - }, - light: { - svgUrl: '/app-content-service/theft.svg', - }, - }, - }, - }, - { - title: 'Skadegörelse', - info: - 'Lås ytterdörrar och regla fönster när ingen är hemma. Och märk inte dina nycklar så att folk förstår vart du bor eller vart de går.', - covered: [ - 'Sakerna i din lägenhet till ett värde upp till 1 miljon kronor', - 'Inbrott och skadegörelse i t.ex. vind/källare', - ], - exceptions: [ - 'Stöld av pengar, värdehandlingar och stöldbegärlig egendom (smycken, mobiltelefoner, datorer och allt annat dyrt) ifrån biyta', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/criminal_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/criminal_damage.svg', - }, - }, - }, - }, - { - title: 'Ansvarsskydd', - info: - 'Kontakta Hedvig direkt när någon kräver dig på skadestånd. Medge aldrig någon skyldighet utan ta ett djupt andetag och låt oss hjälpa dig istället.', - covered: [ - 'T.ex. om ditt handfat gått sönder i en lägenhet', - 'T.ex. vattenskada från din lägenhet som drabbar grannarna', - 'T.ex. Hunden orsakar bitskador', - 'Utredning och förhandling', - 'Representation i domstol', - 'Max 5 000 000 kr i ersättning per försäkringsår och person/sakskada', - ], - exceptions: [ - 'Skada i samband med arbete', - 'Skada orsakat av när du kört bil/fordon', - 'Uppsåtligt brott, t.ex. om du skadar någon/något med flit', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/liability_dark.svg', - }, - light: { - svgUrl: '/app-content-service/liability.svg', - }, - }, - }, - }, - { - title: 'Rättsskydd', - info: - 'Du måste välja vem som ska representera dig och personen måste vara medlem i Svenska advokatsamfundet. Sen måste ombudet skicka in en ansökan till oss innan du kan få besked om rättsskyddet täcker tvisten.', - covered: [ - 'Vårdnadstvist', - 'Arvstvist', - 'Fastighetstvist', - 'Advokat och representation i domstol', - 'Krav enligt skadeståndslagen', - 'Mellan 1 500 - 250 000 kr i ersättning, självrisk 20% av totalbeloppet', - ], - exceptions: [ - 'Småmål enligt rättegångsbalken', - 'Uppsåtligt brott, t.e.x om du skadat någon/något med flit', - 'Uppsåtligt brott, t.ex. om du skadar någon/något med flit', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/legal_protection_dark.svg', - }, - light: { - svgUrl: '/app-content-service/legal_protection.svg', - }, - }, - }, - }, - { - title: 'Resetrubbel', - info: - 'Anmäl försenat bagage direkt till flygbolaget och se alltid till att få en så kallad PIR-rapport, som kvitto på att ditt bagage är försenat/försvunnet.', - covered: [ - 'Reseskydd i 45 dagar, kan förlängas till max 90 dagar', - 'Evakuering vid krig', - 'Evakuering vid epidemi', - 'Evakuering vid naturkatastrof, jordskalv, vulkanutbrott', - 'Bagageförsening vid utresa', - 'Max 5000 kr i ersättning vid försenat bagage', - ], - exceptions: [ - 'Hemresa från land som UD avråder folk från att resa till', - 'Förlorat bagage', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/travel_insurance_dark.svg', - }, - light: { - svgUrl: '/app-content-service/travel_insurance.svg', - }, - }, - }, - }, - { - title: 'Överfall', - info: - 'Hur du själv agerar i olika situationer kan påverka hur stor din ersättning blir. Om du är påverkad av alkohol eller droger, är provocerande eller aggressiv eller medvetet går in i konflikter kan din ersättning minskas eller helt utebli.', - covered: [ - 'Misshandel (som inte är ringa) eller rån', - 'Grov misshandel med livshotande skada', - 'Grovt rån', - 'Ofredande om du är under 18 år', - 'Våldtäkt', - 'Mellan 8000 kr - 200 000 kr i ersättning, ingen självrisk', - ], - exceptions: [ - 'Brott i samband med arbete eller när du medvetet blandar dig i bråk', - 'Överfallsskada i samband med upplopp / huliganism / våld i hemmet', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/assault_dark.svg', - }, - light: { - svgUrl: '/app-content-service/assault.svg', - }, - }, - }, - }, - { - title: 'Sjuk på resa', - info: - 'Kontakta alltid oss direkt via appen eller ring Hedvig Global Assistance på +45 38 48 94 61 som har öppet dygnet runt.', - covered: [ - 'Olycksfall, akut sjukdom, akuta tandbesvär', - 'Avbruten resa p.g.a att närstående person avlidit/allvarligt sjuk/skadad', - 'Läkarvård och logi', - 'Ingen självrisk', - 'Inget maxtak för ersättning', - ], - exceptions: [ - 'Sjukdomstillstånd som var kända innan avresan', - 'Kampsport med kroppskontakt/Fallskärmshoppning/Skärmflygning', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/sick_on_holiday_dark.svg', - }, - light: { - svgUrl: '/app-content-service/sick_on_holiday.svg', - }, - }, - }, - }, - { - title: 'Vitvaror', - info: 'Det finns inget speciellt att tänka på.', - covered: [ - 'Vitvaror/hushållsmaskiner p.g.a kortslutning, överslag eller överspänning', - 'Installation för värme, vatten, avlopp, ventilation, gas, el', - 'Glasrutor i fönster/dörrar i byggnaden', - 'Tvätt i tvättmaskin/torktumlare vid fel på maskinen', - 'Sanitetsgods', - 'Livsmedel i frys vid strömavbrott', - 'Egeninstallerad hiss (max 20.000 kr)', - ], - exceptions: [ - 'Ytliga skador och skönhetsfel ersätts inte', - 'Värmeslingor i golv i badrum eller annat våtutrymme', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/appliance_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/appliance_damage.svg', - }, - }, - }, - }, - { - title: 'Drulle', - info: - 'Ta med mobilen (stöldbegärlig egendom) när du lämnar bilen. Lämna inte värdefulla ägodelar i källaren (biyta) och checka inte in smycken eller klockor när du reser.', - covered: [ - 'Plötslig och oförutsedd skada', - 'Plötslig och oförutsedd händelse', - 'T.ex. om du skulle spilla kaffe på din dator', - 'T.ex. om du tappar din mobiltelefon i marken', - 'T.ex. om du sätter dig på dina glasögon', - 'Max 50 000 kr i ersättning per förlorad eller skadad sak', - ], - exceptions: [ - 'Lånad egendom t.ex. lånedator från jobbet/skolan', - 'Stöld av stöldbegärlig egendom (ex: kamera, smycke) i bil/lokal/biyta', - 'Stöld av pengar eller värdehandlingar', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/all_risk_dark.svg', - }, - light: { - svgUrl: '/app-content-service/all_risk.svg', - }, - }, - }, - }, - { - title: 'Bostadsrätts­tillägg', - info: 'Inget särskilt.', - covered: [ - 'skador på fast inredning (typ ditt nya kök)', - 'skador på ytskikt (typ dina nyfixade golv, tak eller väggar)', - ], - exceptions: ['Inget särskilt!'], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/brf_additional_dark.svg', - }, - light: { - svgUrl: '/app-content-service/brf_additional.svg', + id: 'SE_APARTMENT_BRF', + label: 'Homeowner insurance', + items: [ + { + title: 'Fire', + info: 'Be careful with candles and fires.', + covered: [ + 'Fire due to open flames (not just glow)', + 'Explosion', + 'Sudden damage caused by soot', + 'Lightning', + 'Corrosive gas created by unintentional burning of plastics', + 'Cleaning of soot caused by open fire', + ], + exceptions: ['Explosive work', 'Soot from lit candles'], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/fire_dark_942da46f6f.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/fire_97796e0790.svg', + }, + }, }, }, - }, - }, -] - -export const housePerils: Peril[] = [ - { - title: 'Eldsvåda', - description: - 'Vi hjälper dig med reparation, ersättningsboende och sanering om det skulle börja brinna i din villa eller någon annan försäkrad byggnad. Och om ditt hus blir totalskadat ersätter vi dig med en likadan eller motsvarande villa.', - info: 'Var försiktig med levande ljus eller eld.', - covered: [ - 'Totalskadat hus efter brand', - 'Explosion', - 'Blixt', - 'Frätande gas som bildats vid oavsiktlig upphettning av plast', - 'Sanering av sot orsakad av öppen låga', - ], - exceptions: ['Sprängningsarbete, sot eller levande ljus'], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/fire_dark.svg', - }, - light: { - svgUrl: '/app-content-service/fire.svg', + { + title: 'Water leaks', + info: + 'Make sure that faucets are sealed and turned off when not in use. Place drip trays that collect water below the fridge/freezer/washing machine. Make sure that the piping system and devices connected to it do not freeze. If you leave your apartment for more than seven days, shut the main water valve.', + covered: [ + 'Unexpected escape of liquid/steam from the pipework system, connected appliances or kitchen, laundry room and bathroom.', + 'Leaking fridge/freezer', + 'Leaking fire extinguisher', + 'Leaking sink', + 'Leaking aquarium', + ], + exceptions: [ + 'Surface and water barrier installed by uncertified plumber', + 'Damage to the leaking unit itself', + 'Damage caused by roof gutters or external downspouts', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_dark_227105c1de.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_e25b83cd0b.svg', + }, + }, }, }, - }, - }, - { - title: 'Vattenläcka', - description: - 'Skyddet kan ge ersättning vid olika typer av vattenskador t.ex. om en tvättmaskin läckt okontrollerat eller ett badrum svämmat över. Du kan få ersättning både för att åtgärda skadorna på huset samt för andra merkostnader under reparationen.', - info: - 'Se till att kranar är täta och stängda när de inte används. Lägg underlägg under kyl/frys/ diskmaskin som samlar upp vatten. Se till att ledningssystem och anslutna anordningar inte fryser sönder. Och lämnar du huset i mer än 7 dagar så måste vattnet stängas av helt.', - covered: [ - 'Oberäknat vatten/ånga från vattenledningssytem', - 'Oberäknat vatten/ånga från badrum, kök eller tvättstuga', - 'Oberäknat vatten/ånga från värmepanna', - 'Läckage från kyl/frys', - 'Läckage från brandsläckare', - 'Läckage från tvättställ', - 'Läckage från akvarie', - ], - exceptions: [ - 'Yt-och tätskikt installerats utan behörig installatör', - 'Skada på det föremål som har läckt', - 'Skada orsakat av takränna eller utvändigt stuprör', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/water_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/water_damage.svg', + { + title: 'Burglary', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your apartment up to a total value of SEK 1 million', + ], + exceptions: [ + 'Theft of money, valuable documents and other theft-prone property (jewelry, mobile phones, computers and other expensive items) from ancillary areas', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_dark_e79b95b4bc.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_946096433f.svg', + }, + }, }, }, - }, - }, - { - title: 'Oväder', - description: - 'Skulle ditt hus, din tomt eller dina saker bli skadat p.g.a översvämning, snötryck, storm, hagel, regn, kyla eller jordskalv kan du få ersättning från oss. Det finns också viss möjlighet att få ersättning om du missar en resa på grund av oväder.', - info: - 'Se till att inspektera taket och lägg om takplattor om de ser dåliga ut. Hantverkare brukar rekommendera att du byter tak var trettionde år.', - covered: [ - 'Översvämning p.g.a. skyfall (1mm/minut eller 50mm/dygn) snösmältning, stigande sjö eller vattendrag genom rör, avloppet eller där vatten strömmar från markytan in i huset.', - 'Storm (minst 21 m/s), t.e.x. träd blåser ner och skadar ditt hus', - 'Hagel, kyla eller regn', - 'Jordskalv (minst 4 på richterskalan), jordras, bergras, lavin', - ], - exceptions: [ - 'Översvämning p.g.a husets dränering och grund', - 'Översvämning p.g.a yttertaket läcker in regnvatten', - 'Skador på båthus, sjöbod, växthus och tomtmark', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/nature_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/nature_damage.svg', + { + title: 'Theft and damage', + info: + 'Always keep an eye on your gadgets, for example do not leave your camera alone on a coffee-house table. If you leave theft-prone property inside your car, always lock the car and hide gadgets. One last thing: always lock your bike.', + covered: [ + 'Theft or damage to your home', + 'Theft from common spaces, e.g. bike or stroller storage', + 'Theft or damage to possessions that you have taken to work or a hotel room', + 'Storage, e.g. Shurgard', + 'Theft outside the home', + 'Theft from car while travelling', + ], + exceptions: [ + 'For some items, e.g. money, electronics, mobile phones, computers, cameras, liquor and jewelry, special rules apply depending on where the theft occurred.', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/theft_dark_71deb24845.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/theft_701fa78317.svg', + }, + }, }, }, - }, - }, - { - title: 'Inbrott', - description: - 'Skyddet gäller när någon utan lov gjort inbrott eller förstört ditt hus. Skyddet gäller självklart också för vinden och källaren, samt om tjuven gjort inbrott i ditt garage.', - info: - 'Lås ytterdörrar och regla fönster när ingen är hemma. Och märk inte dina nycklar så att folk förstår vart du bor eller vart de går.', - covered: [ - 'Allt du äger i din villa till ett värde upp till 1.5 miljoner', - 'Inbrott och skadegörelse i din villa/biutrymmen, t.ex. vind/källare', - 'Inbrott i garage', - 'Kostnad för byte av lås', - ], - exceptions: [ - 'Stöld av pengar, värdehandlingar och stöldbegärlig egendom (smycken, mobiltelefoner, datorer och allt annat dyrt) ifrån biyta', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/burglary_dark.svg', - }, - light: { - svgUrl: '/app-content-service/burglary.svg', + { + title: 'Criminal damage', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your apartment up to a total value of SEK 1 million', + ], + exceptions: [ + 'Theft of money, valuable documents and theft-prone property (jewelry, mobile phones, computers and other expensive property) from ancillary spaces', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_dark_b34c7450c7.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_9f725dc7cf.svg', + }, + }, }, }, - }, - }, - { - title: 'Skadedjur', - description: - 'Drabbas ditt hus av skadedjur kan du få ersättning för sanering och reparation upp till 4 000 000 kr. Skyddet gäller sanering av husbock, hästmyra, myror, getingar, råttor, möss och andra bostadsinsekter, samt när vilda djur tar sig in och orsakar skada i ditt hem.', - info: 'Det finns inget speciellt att tänka på.', - covered: [ - 'Fackmannamässig sanering', - 'T.ex. rådgivning, fällor, mekanisk eller kemisk sanering', - 'Reparation av bärande byggdelar som skadats', - 'Skador från vilda djur (älg, ren, bäver) som tagit sig in i din villa', - 'Ersättning: upp till 4 000 000 kr', - ], - exceptions: [ - 'Livsmedel, kläder, saneringsstädning, angrepp på rötskadat virke', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/pest_sanitation_dark.svg', - }, - light: { - svgUrl: '/app-content-service/pest_sanitation.svg', + { + title: 'Liability protection', + info: + 'Contact us directly if someone is filing a claim against you. Never admit any guilt. We are here to help!', + covered: [ + "E.g. damages to someone else's sink", + 'E.g. leak from your apartment that affects your neighbour', + 'E.g. your dog bites someone', + 'Investigation and negotiation', + 'Legal representation', + 'Compensation: Maximum SEK 5 Million', + ], + exceptions: [ + 'Injury related to your work', + 'Damages from driving', + 'Intentional crime, e.g. if you injure someone on purpose', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/liability_dark_164eb67626.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/liability_c331907aff.svg', + }, + }, }, }, - }, - }, - { - title: 'Ombyggnation', - description: - 'Under alla delar av ombyggnationen av huset skyddar vi dig. Med hjälp av den här delen av skyddet kan du t.e.x få ersättning vid stöld av material och verktyg ur verktygsbodar som du köpt för att genomföra renoveringen.', - info: 'Förvara verktyg och material i låst utrymme.', - covered: [ - 'Ditt hus under till-, om- eller uppbyggnad', - 'Byggbod', - 'Material', - 'Verktyg', - ], - exceptions: [ - 'Vattenskada p.g.a installation av ej testat/felfritt rörsystem', - 'Stormskador på verktyg eller material', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/renovation_dark.svg', - }, - light: { - svgUrl: '/app-content-service/renovation.svg', + { + title: 'Legal protection', + info: + 'You have to choose your own representation and that person needs to be a member of the Swedish law Society. Make sure your representative contacts us directly to see whether or not the legal protection is valid.', + covered: [ + 'Custody dispute', + 'Inheritance dispute', + 'Property dispute', + 'Legal representation', + 'Claims according to Tort Liability Act', + 'Compensation: SEK 1,500 - 250,000, 25% deductible', + ], + exceptions: [ + 'Simplified litigation according to Code of Judicial Procedure', + "Intentional crimes, e.g. if you've injured someone on purpose", + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_dark_bc536f7368.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_f6e65e1b13.svg', + }, + }, }, }, - }, - }, - { - title: 'Stöld', - description: - 'Vid stöld och skadegörelse av dina saker så täcks dem och ersätts av oss. Oavsett om du är hemma eller på flygande fot kan du alltid känna dig trygg med oss.', - info: - 'Ha alltid uppsikt över dina saker. Lämna inte värdesaker på t.ex. ett bord på ett café. Lås alltid bilen om du förvarar saker där och stöldbegärlig egendom (smycke, dator) ska alltid döljas. Och lås alltid din cykel.', - covered: [ - 'Stöld eller skadegörelse i ditt hem', - 'Stöld ur gemensamhetsutrymme, t.ex. cykel- eller barnvagnsförråd', - 'Stöld eller skadegörelse av saker du tar med dig till ditt arbete eller hotellrum', - 'Stöld eller skadegörelse vid förvaring hos t.ex. Shurguard', - 'Stöld utanför bostaden', - 'Stöld ur bil när du är på resa', - ], - exceptions: [ - 'För vissa typer av saker, t.ex. pengar, hemelektronik, mobiltelefoner, datorer, kameror, sprit och smycken gäller speciella regler beroende på var stölden inträffat.', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/theft_dark.svg', - }, - light: { - svgUrl: '/app-content-service/theft.svg', + { + title: 'Travel insurance', + info: + 'Report delayed luggage to your air carrier and make sure to get a PIR report as proof that your luggage is delayed or missing.', + covered: [ + 'Travel coverage first 45 days', + 'Evacuation in the event of war', + 'Evacuation in the event of an epidemic', + 'Evacuation in the event of natural catastrophes, earthquake or volcanic eruption', + ], + exceptions: [ + 'Travelling home from places the Swedish Ministry of Foreign Affairs warns you to not travel to', + 'Lost luggage', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_dark_79cb1c4e58.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_ed0fa95fdf.svg', + }, + }, }, }, - }, - }, - { - title: 'Skadegörelse', - description: - 'Skyddet gäller när någon utan lov gjort inbrott eller förstört ditt hus. Skyddet gäller självklart också för vinden och källaren, samt om tjuven gjort inbrott i ditt garage.', - info: - 'Lås ytterdörrar och regla fönster när ingen är hemma. Och märk inte dina nycklar så att folk förstår vart du bor eller vart de går.', - covered: [ - 'Allt du äger i din villa till ett värde upp till 1.5 miljoner', - 'Inbrott och skadegörelse i din villa/biutrymmen, t.ex. vind/källare', - 'Inbrott i garage', - 'Kostnad för byte av lås', - ], - exceptions: [ - 'Stöld av pengar, värdehandlingar och stöldbegärlig egendom (smycken, mobiltelefoner, datorer och allt annat dyrt) ifrån biyta', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/criminal_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/criminal_damage.svg', + { + title: 'Assault', + info: + 'How you act in various situations affects the level of compensation. If you intervene in a fight or if you are under the influence of alcohol or drugs, then compensation will be lowered or of zero value.', + covered: [ + 'Assault or robbery', + 'Aggravated assault with life threatening damages', + 'Aggravated robbery', + 'Persecution aged 18 and under', + 'Rape', + 'Compensation: SEK 8,000 - 200,000, no deductible', + ], + exceptions: [ + 'Crimes in connection to work or if you intervened in a fight', + 'Damages in connection to rioting / hooliganism / domestic violence', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/assault_dark_f53ce07038.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/assault_d371c026ac.svg', + }, + }, }, }, - }, - }, - { - title: 'Ansvarsskydd', - description: - 'Vårt ansvarsskydd gäller när någon kräver dig på skadestånd för att ha skadat honom eller henne eller dennes ägodelar. Vi hjälper dig med utredning och förhandling och vi betalar både rättegångskostnader och skadestånd om du vållat skadan.', - info: - 'Kontakta Hedvig direkt när någon kräver dig på skadestånd. Medge aldrig någon skyldighet utan ta ett djupt andetag och låt oss hjälpa dig istället.', - covered: [ - 'T.ex. om ditt handfat gått sönder i en lägenhet', - 'T.ex. vattenläcka från ditt hus in i grannhuset', - 'T.ex. hunden biter någon', - 'Utredning och förhandling', - 'Representation i domstol', - 'Max 5 000 000 kr i ersättning per försäkringsår och person/sakskada', - ], - exceptions: [ - 'Skada i samband med arbete', - 'Skada orsakat av när du kört bil/fordon', - 'Uppsåtligt brott, t.ex. om du skadar någon/något med flit', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/liability_dark.svg', - }, - light: { - svgUrl: '/app-content-service/liability.svg', + { + title: 'Travel illness', + info: + 'Always contact us directly through our app or by calling Hedvig Global Assistance on +45 38 48 94 61.', + covered: [ + 'Casualty, acute illness, acute dental issues', + 'Cancelled travel due to a closely related person dying / becoming seriously ill or injured', + 'Medical assistance and accommodation', + 'No deductible', + 'No maximum limit for reimbursement', + ], + exceptions: [ + 'Illness or medical condition known before departure', + 'Martial arts with body contact / sky diving / paragliding', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_dark_3e0e5a0dc5.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_17b3f1899c.svg', + }, + }, }, }, - }, - }, - { - title: 'Rättsskydd', - description: - 'Vårt rättsskydd kan ge dig ersättning för att t.ex. anlita advokat/ombud om du hamnar i en rättslig tvist. Skyddet gäller i tvister som prövas i tingsrätt, hovrätt eller Högsta domstolen.', - info: - 'Du måste välja vem som ska representera dig och personen måste vara medlem i Svenska advokatsamfundet. Sen måste ombudet skicka in en ansökan till oss innan du kan få besked om rättsskyddet täcker tvisten.', - covered: [ - 'Vårdnadstvist', - 'Arvstvist', - 'Fastighetstvist', - 'Advokat och representation i domstol', - 'Krav enligt skadeståndslagen', - 'Mellan 1 500 - 250 000 kr i ersättning, självrisk 20% av totalbeloppet', - ], - exceptions: [ - 'Småmål enligt rättegångsbalken', - 'Uppsåtligt brott, t.e.x om du skadat någon/något med flit', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/legal_protection_dark.svg', - }, - light: { - svgUrl: '/app-content-service/legal_protection.svg', + { + title: 'White goods', + info: "There's nothing special for you to think about.", + covered: [ + 'White goods/home appliances due to short circuit, over voltage or high voltage', + 'Installations of heating, water supply, sewerage, ventilation and gas', + 'Windows panes', + 'Clothes due to washing machine/dryer problems', + 'Sanitary ware (e.g. toilet and sink)', + 'Food in freezer due to power outage', + 'Self-installed elevator (Maximum SEK 20,000)', + ], + exceptions: [ + 'Superficial damages and beauty defects', + 'Underfloor heating in bathrooms or other wet spaces', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_dark_03df6c1df9.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_2a23c61a09.svg', + }, + }, }, }, - }, - }, - { - title: 'Resetrubbel', - description: - 'Du kan få ersättning om ditt bagage blir försenat på utresa. Och är du i ett land där det utbryter krig eller det sker en naturkatastrof, ja då flyger vi hem dig till Sverige och ersätter dig för de nödvändiga och skäliga kostnaderna.', - info: - 'Anmäl försenat bagage direkt till flygbolaget och se alltid till att få en så kallad PIR-rapport, som kvitto på att ditt bagage är försenat/försvunnet.', - covered: [ - 'Reseskydd i 45 dagar, kan förlängas till max 90 dagar', - 'Evakuering vid krig', - 'Evakuering vid epidemi', - 'Evakuering vid naturkatastrof, jordskalv, vulkanutbrott', - 'Bagageförsening vid utresa', - 'Max 5000 kr i ersättning vid försenat bagage', - ], - exceptions: [ - 'Hemresa från land som UD avråder folk från att resa till', - 'Förlorat bagage', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/travel_insurance_dark.svg', - }, - light: { - svgUrl: '/app-content-service/travel_insurance.svg', + { + title: 'All-risk', + info: + "Take your mobile phone (theft-prone property) with you when leaving your car. Don't leave valuable property in your basement (ancillary space). If you check-in jewelry or watches in your bag while travelling, we will not be able to compensate you if they are lost.", + covered: [ + 'Unforeseen damages', + 'Unforeseen events', + 'E.g. you spilled coffee on your laptop', + 'E.g. you dropped your phone in the toilet', + 'E.g. you sat on your glasses', + 'Compensation: SEK 50,000, max, per claim', + ], + exceptions: [ + 'Borrowed property, e.g. work computer', + 'Theft-prone property from car/ancillary area, e.g camera, jewelry', + 'Theft of cash or valuable documents', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_dark_c6f43f63a6.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_eba77dfb03.svg', + }, + }, }, }, - }, - }, - { - title: 'Överfall', - description: - 'Vårt överfallsskydd kan ge dig ersättning om du blir utsatt för brott, t.ex. misshandel, rån, ofredande eller våldtäkt. Skyddet kan också ge dig ersättning om du skulle bli utsatt för försök till brott.', - info: - 'Hur du själv agerar i olika situationer kan påverka hur stor din ersättning blir. Om du är påverkad av alkohol eller droger, är provocerande eller aggressiv eller medvetet går in i konflikter kan din ersättning minskas eller helt utebli.', - covered: [ - 'Misshandel (som inte är ringa) eller rån', - 'Grov misshandel med livshotande skada', - 'Grovt rån', - 'Ofredande om du är under 18 år', - 'Våldtäkt', - 'Mellan 8000 kr - 200 000 kr i ersättning, ingen självrisk', - ], - exceptions: [ - 'Brott i samband med arbete eller när du medvetet blandar dig i bråk', - 'Överfallsskada i samband med upplopp / huliganism / våld i hemmet', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/assault_dark.svg', - }, - light: { - svgUrl: '/app-content-service/assault.svg', + { + title: 'Tenant ownership', + info: "There's nothing special for you to think about", + covered: [ + 'Water or fire damage on interior, e.g. your new kitchen', + 'Water or fire damage on surfaces, e.g. your new floor', + ], + exceptions: ["There's nothing special for you to think about"], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/brf_additional_dark_d5688cc8e6.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/brf_additional_51b2fb160a.svg', + }, + }, }, }, - }, - }, - { - title: 'Sjuk på resa', - description: - 'Vårt reseskydd gäller de första 45 dagarna på din resa och ersätter kostnader om du blir akut sjuk, skadar dig eller får akuta tandskador. Vi flyger även hem dig till Sverige för vidare vård om det bedöms nödvändigt.', - info: - 'Kontakta alltid oss direkt via appen eller ring Hedvig Global Assistance på +45 38 48 94 61 som har öppet dygnet runt.', - covered: [ - 'Olycksfall, akut sjukdom, akuta tandbesvär', - 'Avbruten resa p.g.a att närstående person avlidit/allvarligt sjuk/skadad', - 'Läkarvård och logi', - 'Ingen självrisk', - 'Inget maxtak för ersättning', - ], - exceptions: [ - 'Sjukdomstillstånd som var kända innan avresan', - 'Kampsport med kroppskontakt/Fallskärmshoppning/Skärmflygning', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/sick_on_holiday_dark.svg', - }, - light: { - svgUrl: '/app-content-service/sick_on_holiday.svg', - }, - }, - }, - }, - { - title: 'Vitvaror', - description: - 'Vi finns här för dig när du får problem med frysen, kylskåpet, tvättmaskinen, torktumlaren, diskmaskinen eller ugnen. Blir det strömavbrott eller blir något fel på frysen kan du få ersättning för mat som förstörs.', - info: 'Det finns inget speciellt att tänka på.', - covered: [ - 'Vitvaror/hushållsmaskiner p.g.a kortslutning, överslag eller överspänning', - 'Installation för värme, vatten, avlopp, ventilation, gas, el', - 'Glasrutor i fönster/dörrar i byggnaden', - 'Tvätt i tvättmaskin/torktumlare vid fel på maskinen', - 'Sanitetsgods', - 'Livsmedel i frys vid strömavbrott', - 'Egeninstallerad hiss (max 20.000 kr)', - ], - exceptions: [ - 'Ytliga skador och skönhetsfel ersätts inte', - 'Värmeslingor i golv i badrum eller annat våtutrymme', ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/appliance_damage_dark.svg', - }, - light: { - svgUrl: '/app-content-service/appliance_damage.svg', - }, - }, - }, - }, - { - title: 'Drulle', - description: - 'Vår drulleförsäkring gäller när du har sönder saker som du äger genom en plötslig och oförutsedd händelse. Vi hjälper dig t.e.x när du spiller kaffe på datorn, tappar mobilen i marken eller sätter dig på glasögonen. Drulle ingår alltid utan extra kostnad.', - info: - 'Ta med mobilen (stöldbegärlig egendom) när du lämnar bilen. Lämna inte värdefulla ägodelar i källaren (biyta) och checka inte in smycken eller klockor när du reser.', - covered: [ - 'Plötslig och oförutsedd skada', - 'Plötslig och oförutsedd händelse', - 'T.ex. om du skulle spilla kaffe på din dator', - 'T.ex. om du tappar din mobiltelefon i marken', - 'T.ex. om du sätter dig på dina glasögon', - 'Max 50 000 kr i ersättning per förlorad eller skadad sak', - ], - exceptions: [ - 'Lånad egendom t.ex. lånedator från jobbet/skolan', - 'Stöld av stöldbegärlig egendom (ex: kamera, smycke) i bil/lokal/biyta', - 'Stöld av pengar eller värdehandlingar', - ], - icon: { - variants: { - dark: { - svgUrl: '/app-content-service/all_risk_dark.svg', - }, - light: { - svgUrl: '/app-content-service/all_risk.svg', - }, - }, - }, }, ] diff --git a/src/components/Perils/perilMockData/multiplePromises.tsx b/src/components/Perils/perilMockData/multiplePromises.tsx new file mode 100644 index 00000000..55a16b7b --- /dev/null +++ b/src/components/Perils/perilMockData/multiplePromises.tsx @@ -0,0 +1,769 @@ +import { PerilsCollection } from '../types' + +export const mockPerils: PerilsCollection[] = [ + { + id: 'SE_APARTMENT_BRF', + label: 'Homeowner insurance', + items: [ + { + title: 'Fire', + info: 'Be careful with candles and fires.', + covered: [ + 'Fire due to open flames (not just glow)', + 'Explosion', + 'Sudden damage caused by soot', + 'Lightning', + 'Corrosive gas created by unintentional burning of plastics', + 'Cleaning of soot caused by open fire', + ], + exceptions: ['Explosive work', 'Soot from lit candles'], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/fire_dark_942da46f6f.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/fire_97796e0790.svg', + }, + }, + }, + }, + { + title: 'Water leaks', + info: + 'Make sure that faucets are sealed and turned off when not in use. Place drip trays that collect water below the fridge/freezer/washing machine. Make sure that the piping system and devices connected to it do not freeze. If you leave your apartment for more than seven days, shut the main water valve.', + covered: [ + 'Unexpected escape of liquid/steam from the pipework system, connected appliances or kitchen, laundry room and bathroom.', + 'Leaking fridge/freezer', + 'Leaking fire extinguisher', + 'Leaking sink', + 'Leaking aquarium', + ], + exceptions: [ + 'Surface and water barrier installed by uncertified plumber', + 'Damage to the leaking unit itself', + 'Damage caused by roof gutters or external downspouts', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_dark_227105c1de.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_e25b83cd0b.svg', + }, + }, + }, + }, + { + title: 'Burglary', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your apartment up to a total value of SEK 1 million', + ], + exceptions: [ + 'Theft of money, valuable documents and other theft-prone property (jewelry, mobile phones, computers and other expensive items) from ancillary areas', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_dark_e79b95b4bc.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_946096433f.svg', + }, + }, + }, + }, + { + title: 'Theft and damage', + info: + 'Always keep an eye on your gadgets, for example do not leave your camera alone on a coffee-house table. If you leave theft-prone property inside your car, always lock the car and hide gadgets. One last thing: always lock your bike.', + covered: [ + 'Theft or damage to your home', + 'Theft from common spaces, e.g. bike or stroller storage', + 'Theft or damage to possessions that you have taken to work or a hotel room', + 'Storage, e.g. Shurgard', + 'Theft outside the home', + 'Theft from car while travelling', + ], + exceptions: [ + 'For some items, e.g. money, electronics, mobile phones, computers, cameras, liquor and jewelry, special rules apply depending on where the theft occurred.', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/theft_dark_71deb24845.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/theft_701fa78317.svg', + }, + }, + }, + }, + { + title: 'Criminal damage', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your apartment up to a total value of SEK 1 million', + ], + exceptions: [ + 'Theft of money, valuable documents and theft-prone property (jewelry, mobile phones, computers and other expensive property) from ancillary spaces', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_dark_b34c7450c7.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_9f725dc7cf.svg', + }, + }, + }, + }, + { + title: 'Liability protection', + info: + 'Contact us directly if someone is filing a claim against you. Never admit any guilt. We are here to help!', + covered: [ + "E.g. damages to someone else's sink", + 'E.g. leak from your apartment that affects your neighbour', + 'E.g. your dog bites someone', + 'Investigation and negotiation', + 'Legal representation', + 'Compensation: Maximum SEK 5 Million', + ], + exceptions: [ + 'Injury related to your work', + 'Damages from driving', + 'Intentional crime, e.g. if you injure someone on purpose', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/liability_dark_164eb67626.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/liability_c331907aff.svg', + }, + }, + }, + }, + { + title: 'Legal protection', + info: + 'You have to choose your own representation and that person needs to be a member of the Swedish law Society. Make sure your representative contacts us directly to see whether or not the legal protection is valid.', + covered: [ + 'Custody dispute', + 'Inheritance dispute', + 'Property dispute', + 'Legal representation', + 'Claims according to Tort Liability Act', + 'Compensation: SEK 1,500 - 250,000, 25% deductible', + ], + exceptions: [ + 'Simplified litigation according to Code of Judicial Procedure', + "Intentional crimes, e.g. if you've injured someone on purpose", + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_dark_bc536f7368.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_f6e65e1b13.svg', + }, + }, + }, + }, + { + title: 'Travel insurance', + info: + 'Report delayed luggage to your air carrier and make sure to get a PIR report as proof that your luggage is delayed or missing.', + covered: [ + 'Travel coverage first 45 days', + 'Evacuation in the event of war', + 'Evacuation in the event of an epidemic', + 'Evacuation in the event of natural catastrophes, earthquake or volcanic eruption', + ], + exceptions: [ + 'Travelling home from places the Swedish Ministry of Foreign Affairs warns you to not travel to', + 'Lost luggage', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_dark_79cb1c4e58.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_ed0fa95fdf.svg', + }, + }, + }, + }, + { + title: 'Assault', + info: + 'How you act in various situations affects the level of compensation. If you intervene in a fight or if you are under the influence of alcohol or drugs, then compensation will be lowered or of zero value.', + covered: [ + 'Assault or robbery', + 'Aggravated assault with life threatening damages', + 'Aggravated robbery', + 'Persecution aged 18 and under', + 'Rape', + 'Compensation: SEK 8,000 - 200,000, no deductible', + ], + exceptions: [ + 'Crimes in connection to work or if you intervened in a fight', + 'Damages in connection to rioting / hooliganism / domestic violence', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/assault_dark_f53ce07038.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/assault_d371c026ac.svg', + }, + }, + }, + }, + { + title: 'Travel illness', + info: + 'Always contact us directly through our app or by calling Hedvig Global Assistance on +45 38 48 94 61.', + covered: [ + 'Casualty, acute illness, acute dental issues', + 'Cancelled travel due to a closely related person dying / becoming seriously ill or injured', + 'Medical assistance and accommodation', + 'No deductible', + 'No maximum limit for reimbursement', + ], + exceptions: [ + 'Illness or medical condition known before departure', + 'Martial arts with body contact / sky diving / paragliding', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_dark_3e0e5a0dc5.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_17b3f1899c.svg', + }, + }, + }, + }, + { + title: 'White goods', + info: "There's nothing special for you to think about.", + covered: [ + 'White goods/home appliances due to short circuit, over voltage or high voltage', + 'Installations of heating, water supply, sewerage, ventilation and gas', + 'Windows panes', + 'Clothes due to washing machine/dryer problems', + 'Sanitary ware (e.g. toilet and sink)', + 'Food in freezer due to power outage', + 'Self-installed elevator (Maximum SEK 20,000)', + ], + exceptions: [ + 'Superficial damages and beauty defects', + 'Underfloor heating in bathrooms or other wet spaces', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_dark_03df6c1df9.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_2a23c61a09.svg', + }, + }, + }, + }, + { + title: 'All-risk', + info: + "Take your mobile phone (theft-prone property) with you when leaving your car. Don't leave valuable property in your basement (ancillary space). If you check-in jewelry or watches in your bag while travelling, we will not be able to compensate you if they are lost.", + covered: [ + 'Unforeseen damages', + 'Unforeseen events', + 'E.g. you spilled coffee on your laptop', + 'E.g. you dropped your phone in the toilet', + 'E.g. you sat on your glasses', + 'Compensation: SEK 50,000, max, per claim', + ], + exceptions: [ + 'Borrowed property, e.g. work computer', + 'Theft-prone property from car/ancillary area, e.g camera, jewelry', + 'Theft of cash or valuable documents', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_dark_c6f43f63a6.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_eba77dfb03.svg', + }, + }, + }, + }, + { + title: 'Tenant ownership', + info: "There's nothing special for you to think about", + covered: [ + 'Water or fire damage on interior, e.g. your new kitchen', + 'Water or fire damage on surfaces, e.g. your new floor', + ], + exceptions: ["There's nothing special for you to think about"], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/brf_additional_dark_d5688cc8e6.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/brf_additional_51b2fb160a.svg', + }, + }, + }, + }, + ], + }, + { + id: 'SE_HOUSE', + label: 'House insurance', + items: [ + { + title: 'Fire', + info: 'Be careful with lit candles or fire.', + covered: [ + 'Completely damaged or destroyed house after fire', + 'Explosion', + 'Lightning', + 'Corrosive gas created by unintentional burning of plastics', + 'Cleaning of soot caused by open flames', + ], + exceptions: ['Explosive work', 'Soot from lit candles'], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/fire_dark_942da46f6f.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/fire_97796e0790.svg', + }, + }, + }, + }, + { + title: 'Water leaks', + info: + 'Make sure that faucets are sealed and turned off when not in use. Place drip trays that collect water below the fridge/freezer/washing machine. Make sure that the piping system and devices connected to it do not freeze. ', + covered: [ + 'Unexpected escape of liquid/steam from the pipework system, connected appliances or kitchen, laundry room and bathroom', + 'Leaking fridge / freezer', + 'Leaking sink', + 'Leaking aquarium', + ], + exceptions: [ + 'Surface and water barrier installed by uncertified plumber', + 'Damage to the leaking unit itself', + 'Damage caused by roof gutters or external downspouts', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_dark_227105c1de.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/water_damage_e25b83cd0b.svg', + }, + }, + }, + }, + { + title: 'Storms', + info: + 'Make sure to inspect the roof and change shingles if they look faulty. Craftsmen usually recommend changing the roof every 30 years.', + covered: [ + 'Flooding due to downpour (1 millimeter/minute or 50 millimeter/day), snow melt, rising lakes or water surge through pipes, drains or where water flows from groundlevel into the house', + 'Storm (minimum 21 m/s), e.g. tree falls on your house', + 'Hail, cold or rain', + 'Earthquake (min Richter scale 4), landslide, rock fall, avalanche', + ], + exceptions: [ + 'Flood due to the drainage system or foundation damage', + 'Flood due to a roof leak whilst it is raining', + 'Damages on boat house, greenhouse and owned land', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/nature_damage_dark_46d183232e.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/nature_damage_7fcf39fd3a.svg', + }, + }, + }, + }, + { + title: 'Burglary', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your house up to a total value of 1.5 million', + 'Burglary and damages to your house/ancillary area, e.g. attic/basement', + 'Garage break-in', + ], + exceptions: [ + 'Theft of money, valuable documents and other theft-prone property (jewerly, mobile phones, computers and other expensive items) from ancillary areas', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_dark_e79b95b4bc.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/burglary_946096433f.svg', + }, + }, + }, + }, + { + title: 'Pests', + info: 'There is nothing special for you to think about.', + covered: [ + 'Professional cleaning', + 'Consulting, traps, mechanical or chemical cleaning', + 'Repairs of damages to primary structures', + 'Wild animals, e.g. elk, reindeer, beaver', + 'Compensation: Maxium SEK 4 million', + ], + exceptions: ['Food, clothes, cleaning, timber rot'], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/pest_sanitation_dark_cb22c7c23b.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/pest_sanitation_d37cc7358f.svg', + }, + }, + }, + }, + { + title: 'Rebuilding', + info: 'Always store materials and tools in a locked shed.', + covered: [ + 'House during renovation or reconstruction', + 'Tool shed', + 'Materials', + 'Power tools', + ], + exceptions: [ + 'Water leaks due to badly installed plumbing system', + 'Storm damages to tools or materials', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/renovation_dark_f06bdf5e59.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/renovation_f05a666a9e.svg', + }, + }, + }, + }, + { + title: 'Theft and damage', + info: + "Always keep an eye on your gadgets, for example don't leave your camera alone on a coffee-house table. If you leave theft-prone property inside your car, always lock the car and hide gadgets. One last thing: always lock your bike.", + covered: [ + 'Theft or damage to your home', + 'Theft from common spaces connected to your house', + 'Theft or damage to posessions that you have taken to work or a hotel room', + 'Theft or damage in a storage facility, e.g. Shurguard', + 'Theft outside the home', + 'Theft from car while travelling', + ], + exceptions: [ + 'For some items, e.g. money, electronics, mobile phones, computers, cameras, liquor and jewelry, special rules apply depending on where the theft occurred.', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/theft_dark_71deb24845.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/theft_701fa78317.svg', + }, + }, + }, + }, + { + title: 'Criminal damage', + info: + 'Lock doors and windows when no one is home. Do not label your keys with your street address to stop people from discovering where you live.', + covered: [ + 'Everything you own in your house up to a total value of 1.5 million', + 'Burglary and damages to your house/ancillary area, e.g. attic/basement', + 'Garage break-in', + ], + exceptions: [ + 'Theft of money, valuable documents and other theft-prone property (jewelry, mobile phones, computers and other expensive items) from ancillary areas', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_dark_b34c7450c7.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/criminal_damage_9f725dc7cf.svg', + }, + }, + }, + }, + { + title: 'Liability protection', + info: + 'Contact us directly if someone is filing a claim against you. Never admit any guilt. We are here to help!', + covered: [ + "E.g. damages to someone else's sink", + 'E.g. leak from your house that affects your neighbour', + 'E.g. your dog bites someone', + 'Legal representation', + 'Representation in court', + 'Compensation: Maximum SEK 5 MIllion', + ], + exceptions: [ + 'Injury related to your work', + 'Damages from driving', + 'Intentional crime, e.g. if you injure someone on purpose', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/liability_dark_164eb67626.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/liability_c331907aff.svg', + }, + }, + }, + }, + { + title: 'Legal protection', + info: + 'You have to choose your own representation and that person needs to be a member of the Swedish law Society. Make sure your representative contacts us directly to see whether or not the legal protection is valid.', + covered: [ + 'Custody dispute', + 'Inheritance dispute', + 'Property dispute', + 'Legal representation', + 'Claims according to Tort Liability Act', + 'Compensation: SEK 1,500 - 250,000, 25% deductible', + ], + exceptions: [ + 'Simplified litigation according to Code of Judicial Procedure', + "Intentional crimes, e.g. if you've injured someone on purpose", + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_dark_bc536f7368.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/legal_protection_f6e65e1b13.svg', + }, + }, + }, + }, + { + title: 'Travel insurance', + info: + 'Report delayed luggage to your air carrier and make sure to get a PIR report as proof that your luggage is delayed or missing.', + covered: [ + 'Travel coverage for the first 45 days', + 'Evacuation in the event of war', + 'Evacuation in the event of an epidemic', + 'Evacuation in the event of natural catastrophes, earthquake or volcanic eruption', + ], + exceptions: [ + 'Travelling home from places the Swedish Ministry of Foreign Affairs warns you to not travel to', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_dark_79cb1c4e58.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/travel_insurance_ed0fa95fdf.svg', + }, + }, + }, + }, + { + title: 'Assault', + info: + 'How you act in various situations affects the level of compensation. If you intervene in a fight or if you are under the influence of alcohol or drugs, then compensation will be lowered or of zero value.', + covered: [ + 'Assault or robbery', + 'Aggravated assault with life threatening damages', + 'Aggravated robbery', + 'Persecution aged 18 and under', + 'Rape', + 'Compensation: SEK 200,000 - 8,000, no deductible', + ], + exceptions: [ + 'Crimes in connection to work or if you intervened in a fight', + 'Damages in connection to rioting / hooliganism / domestic violence', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/assault_dark_f53ce07038.svg', + }, + light: { + svgUrl: 'https://promise.hedvig.com/media/assault_d371c026ac.svg', + }, + }, + }, + }, + { + title: 'Travel illness', + info: + 'Always contact us directly through our app or by calling Hedvig Global Assistance(SOS International) on +45 38 48 94 61.', + covered: [ + 'Casualty, acute illness, acute dental issues', + 'Cancelled travel due to a closely related person dying / becoming seriously ill or injured', + 'Medical attendance and accommodation', + 'No deductible', + 'No maximum limit for reimbursement', + ], + exceptions: [ + 'Illness or medical condition known before departure', + 'Martial arts with body contact / sky diving / paragliding', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_dark_3e0e5a0dc5.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/sick_on_holiday_17b3f1899c.svg', + }, + }, + }, + }, + { + title: 'White goods', + info: "There's nothing special for you to think about.", + covered: [ + 'White goods/home appliances due to short circuit, overvoltage or high voltage', + 'Installations of heating, water supply, sewerage, ventilation and gas', + 'Windows panes', + 'Clothes due to washing machine/dryer problems', + 'Sanitary ware (e.g. toilet and sink)', + 'Food in fridge or freezer due to power outage', + ], + exceptions: [ + 'Superficial damages and beauty defects', + 'In-floor heating in bathrooms or other wet spaces', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_dark_03df6c1df9.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/appliance_damage_2a23c61a09.svg', + }, + }, + }, + }, + { + title: 'All-risk', + info: + "Bring your mobile phone (theft-prone property) with you when leaving your car. Don't leave valuable property in your basement (ancillary space). If you check-in jewelry or watches in your bag while travelling, we will not be able to compensate you if they are lost.", + covered: [ + 'Unforeseen damages', + 'Unforeseen events', + 'E.g. you spilled coffee on your laptop', + 'E.g. you dropped your phone in the toilet', + 'E.g. you sat on your glasses', + 'Compensation: SEK 50,000, max, per claim', + ], + exceptions: [ + 'Borrowed property, e.g. work computer', + 'Theft-prone property from car/ancillary area, e.g camera, jewelry', + 'Theft of cash or valuable documents', + ], + icon: { + variants: { + dark: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_dark_c6f43f63a6.svg', + }, + light: { + svgUrl: + 'https://promise.hedvig.com/media/all_risk_eba77dfb03.svg', + }, + }, + }, + }, + ], + }, +] diff --git a/src/components/Perils/types.ts b/src/components/Perils/types.ts index d7d440ec..35cce6e4 100644 --- a/src/components/Perils/types.ts +++ b/src/components/Perils/types.ts @@ -22,6 +22,12 @@ export interface Peril { icon: PerilIcon } +export interface PerilsCollection { + id: string + label: string + items: Peril[] +} + export type TypeOfContract = | 'SE_HOUSE' | 'SE_APARTMENT_BRF' From ecc146b73658b4f554bc0012f5f1f15731475ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 14:51:25 +0200 Subject: [PATCH 02/12] Add Tabs component --- src/components/Tabs/Tab.tsx | 55 +++++++++++++++ src/components/Tabs/Tabs.stories.tsx | 32 +++++++++ src/components/Tabs/Tabs.tsx | 100 +++++++++++++++++++++++++++ src/components/Tabs/Underline.tsx | 25 +++++++ 4 files changed, 212 insertions(+) create mode 100644 src/components/Tabs/Tab.tsx create mode 100644 src/components/Tabs/Tabs.stories.tsx create mode 100644 src/components/Tabs/Tabs.tsx create mode 100644 src/components/Tabs/Underline.tsx diff --git a/src/components/Tabs/Tab.tsx b/src/components/Tabs/Tab.tsx new file mode 100644 index 00000000..803edb43 --- /dev/null +++ b/src/components/Tabs/Tab.tsx @@ -0,0 +1,55 @@ +import React, { createRef } from 'react' +import styled from '@emotion/styled' +import { colorsV3 } from '@hedviginsurance/brand' +import { LAPTOP_BP_UP } from '../blockHelpers' +import { UnderlineComponent, UNDERLINE_HEIGHT } from './Underline' + +const TabContainer = styled.button<{ selected?: boolean }>` + background-color: transparent; + border: 0; + color: ${({ selected }) => (selected ? colorsV3.gray900 : colorsV3.gray500)}; + cursor: pointer; + display: flex; + font-size: 1.25rem; + line-height: 1.4; + padding: 0 1rem calc(0.25rem + ${UNDERLINE_HEIGHT}) 0; + position: relative; + flex-shrink: 0; + overflow-wrap: anywhere; + margin: 0; + + &:hover { + color: ${colorsV3.gray900}; + } + + ${LAPTOP_BP_UP} { + font-size: 1.5rem; + line-height: 1.33; + padding-right: 2.5rem; + } +` + +type Props = { + onClick: () => void + selected?: boolean + name: string +} + +export const Tab: React.FC = ({ onClick, selected, name }) => { + const ref = createRef() + return ( + + {name} + {selected && } + + ) +} diff --git a/src/components/Tabs/Tabs.stories.tsx b/src/components/Tabs/Tabs.stories.tsx new file mode 100644 index 00000000..4cafcd91 --- /dev/null +++ b/src/components/Tabs/Tabs.stories.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import { Tabs } from './Tabs' + +const mockInsurances = [ + { + id: '1', + name: 'Hemförsäkring', + content: 'one', + }, + { + id: '2', + name: 'Olycksfallsförsäkring', + content: 'two ', + }, + { + id: '3', + name: 'Inbo', + content: 'three', + }, +] + +export default { + title: 'Components/Tabs', + component: Tabs, + parameters: { + backgrounds: { default: 'gray100' }, + }, +} + +export const Default = () => { + return +} diff --git a/src/components/Tabs/Tabs.tsx b/src/components/Tabs/Tabs.tsx new file mode 100644 index 00000000..903b7fbb --- /dev/null +++ b/src/components/Tabs/Tabs.tsx @@ -0,0 +1,100 @@ +import React, { useState, useEffect } from 'react' +import { AnimateSharedLayout } from 'framer-motion' +import styled from '@emotion/styled' +import { colorsV3 } from '@hedviginsurance/brand' +import { LAPTOP_BP_UP } from '../blockHelpers' +import { Tab } from './Tab' + +const TabList = styled.div` + display: flex; + overflow-x: auto; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ + + &::-webkit-scrollbar { + width: 0; + height: 0; + } +` + +const TabContainer = styled.div` + position: relative; + margin-bottom: 1.25rem; + + ${LAPTOP_BP_UP} { + margin-bottom: 2.5rem; + } +` + +const UnderlineBackground = styled.div` + width: 100%; + height: 2px; + background-color: ${colorsV3.gray300}; + position: absolute; + bottom: 0; +` + +const TabPanel = styled.div`` + +type Props = { + items: { + id: string + name: string + content: React.ReactNode + }[] +} +type TabItem = { + id: string + name: string + content: any +} + +export const Tabs: React.FC = ({ items }) => { + const [selected, setSelected] = useState(items[0]) + + const handleClick = (item: TabItem) => { + setSelected(item) + } + + useEffect(() => { + setSelected((selectedItem) => { + const matchingItem = items.find((item) => item.id === selectedItem.id) + return matchingItem ?? items[0] + }) + }, [items]) + + return ( + <> + + + + {items.map((item, index) => ( + handleClick(item)} + selected={selected === item} + name={item.name} + /> + ))} + + + + + + {selected.content && ( + + {selected.content} + + )} + + ) +} diff --git a/src/components/Tabs/Underline.tsx b/src/components/Tabs/Underline.tsx new file mode 100644 index 00000000..f652d4a9 --- /dev/null +++ b/src/components/Tabs/Underline.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import { motion } from 'framer-motion' +import { colorsV3 } from '@hedviginsurance/brand' +// import { useMediaQuery } from 'react-responsive' +// import { BREAKPOINTS } from 'utils/mediaQueries' + +export const UNDERLINE_HEIGHT = '2px' + +export const UnderlineComponent: React.FC = () => { + // const isDesktop = useMediaQuery({ minWidth: BREAKPOINTS.mediumScreen }) + + return ( + + ) +} From cc66a9c335717e0b0b884970bf5194de4d9cf19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 14:54:45 +0200 Subject: [PATCH 03/12] Add framer motion and tslib We couldn't add a more recent version without editing the webpack settings and we had to add tslib --- package.json | 2 ++ yarn.lock | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 762c1255..bbc2c7a8 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "dotenv": "^6.1.0", "emotion": "^10.0.23", "emotion-server": "^10.0.17", + "framer-motion": "4.1.17", "ioredis": "^4.2.0", "ip2location-nodejs": "^8.3.0", "js-cookie": "^2.2.0", @@ -64,6 +65,7 @@ "react-visibility-sensor": "^4.1.3", "sitemap": "^2.1.0", "source-map-support": "^0.5.9", + "tslib": "^2.1.0", "typescript": "^4.2.3", "typescript-logging": "^0.6.3", "uuid": "^8.2.0", diff --git a/yarn.lock b/yarn.lock index 2f41c96d..032c77c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1056,7 +1056,7 @@ resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== -"@emotion/is-prop-valid@0.8.8": +"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.2": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== @@ -6652,6 +6652,26 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +framer-motion@4.1.17: + version "4.1.17" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-4.1.17.tgz#4029469252a62ea599902e5a92b537120cc89721" + integrity sha512-thx1wvKzblzbs0XaK2X0G1JuwIdARcoNOW7VVwjO8BUltzXPyONGAElLu6CiCScsOQRI7FIk/45YTFtJw5Yozw== + dependencies: + framesync "5.3.0" + hey-listen "^1.0.8" + popmotion "9.3.6" + style-value-types "4.1.4" + tslib "^2.1.0" + optionalDependencies: + "@emotion/is-prop-valid" "^0.8.2" + +framesync@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-5.3.0.tgz#0ecfc955e8f5a6ddc8fdb0cc024070947e1a0d9b" + integrity sha512-oc5m68HDO/tuK2blj7ZcdEBRx3p1PjrgHazL8GYEpvULhrtGIFbQArN6cQS2QhW8mitffaB+VYzMjDqBxxQeoA== + dependencies: + tslib "^2.1.0" + fresh@0.5.2, fresh@~0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -7178,6 +7198,11 @@ helmet@^4.0.0, helmet@^4.4.1: resolved "https://registry.yarnpkg.com/helmet/-/helmet-4.4.1.tgz#a17e1444d81d7a83ddc6e6f9bc6e2055b994efe7" integrity sha512-G8tp0wUMI7i8wkMk2xLcEvESg5PiCitFMYgGRc/PwULB0RVhTP5GFdxOwvJwp9XVha8CuS8mnhmE8I/8dx/pbw== +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + highlight.js@~9.13.0: version "9.13.1" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e" @@ -10794,6 +10819,16 @@ polished@^3.3.1: dependencies: "@babel/runtime" "^7.12.5" +popmotion@9.3.6: + version "9.3.6" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-9.3.6.tgz#b5236fa28f242aff3871b9e23721f093133248d1" + integrity sha512-ZTbXiu6zIggXzIliMi8LGxXBF5ST+wkpXGEjeTUDUOCdSQ356hij/xjeUdv0F8zCQNeqB1+PR5/BB+gC+QLAPw== + dependencies: + framesync "5.3.0" + hey-listen "^1.0.8" + style-value-types "4.1.4" + tslib "^2.1.0" + popper.js@^1.14.4, popper.js@^1.14.7: version "1.16.1" resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" @@ -13100,6 +13135,14 @@ style-loader@^1.0.0: loader-utils "^2.0.0" schema-utils "^2.7.0" +style-value-types@4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-4.1.4.tgz#80f37cb4fb024d6394087403dfb275e8bb627e75" + integrity sha512-LCJL6tB+vPSUoxgUBt9juXIlNJHtBMy8jkXzUJSBzeHWdBu6lhzHqCvLVkXFGsFIlNa2ln1sQHya/gzaFmB2Lg== + dependencies: + hey-listen "^1.0.8" + tslib "^2.1.0" + superagent@^3.8.3: version "3.8.3" resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" @@ -13518,6 +13561,11 @@ tslib@^2.0.1, tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== +tslib@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tsscmp@1.0.6, tsscmp@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" From c307b3e72eae10ad603d815a0e05cdf3833d02a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 15:07:07 +0200 Subject: [PATCH 04/12] Update PerilCollection component and creat list component --- .../PerilCollection/PerilCollection.tsx | 88 +++++++------------ .../PerilList.stories.tsx} | 8 +- src/components/Perils/PerilList/PerilList.tsx | 63 +++++++++++++ 3 files changed, 98 insertions(+), 61 deletions(-) rename src/components/Perils/{PerilCollection/PerilCollection.stories.tsx => PerilList/PerilList.stories.tsx} (79%) create mode 100644 src/components/Perils/PerilList/PerilList.tsx diff --git a/src/components/Perils/PerilCollection/PerilCollection.tsx b/src/components/Perils/PerilCollection/PerilCollection.tsx index 3da2e319..563698a1 100644 --- a/src/components/Perils/PerilCollection/PerilCollection.tsx +++ b/src/components/Perils/PerilCollection/PerilCollection.tsx @@ -1,63 +1,37 @@ -import styled from '@emotion/styled' -import React from 'react' -import { LAPTOP_BP_UP, TABLET_BP_UP } from 'components/blockHelpers' -import { PerilItem } from 'components/Perils/PerilItem/PerilItem' -import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps' -import { Peril } from '../types' +import React, { useState } from 'react' +import { minimalColorComponentColors } from 'blocks/BaseBlockProps' +import { GlobalStory } from 'storyblok/StoryContainer' +import { PerilList } from 'components/Perils/PerilList/PerilList' +import { PerilModal } from 'components/Perils/PerilModal/PerilModal' +import { Peril } from 'components/Perils/types' -interface Props { +type Props = { color: minimalColorComponentColors - perils: ReadonlyArray - setCurrentPeril: (index: number) => void - setIsShowingPeril: (isShowingPeril: boolean) => void + perils: Peril[] + story: GlobalStory } -const Wrapper = styled.div` - width: 100%; - display: flex; - flex-direction: row; - flex-wrap: wrap; - margin-left: -0.5rem; - - ${TABLET_BP_UP} { - margin-left: -1rem; - } - - & > * { - width: calc(50% - 0.5rem); - margin-left: 0.5rem; - margin-bottom: 0.5rem; - - ${TABLET_BP_UP} { - width: calc(100% / 3 - 1rem); - margin-left: 1rem; - margin-bottom: 1rem; - } - - ${LAPTOP_BP_UP} { - width: calc(25% - 1rem); - } - } -` - -export const PerilCollection: React.FC = ({ - color, - perils, - setCurrentPeril, - setIsShowingPeril, -}) => ( - - {perils.map((peril, perilIndex) => ( - = ({ perils, story, color }) => { + const [isShowingPeril, setIsShowingPeril] = useState(false) + const [currentPeril, setCurrentPeril] = useState(0) + return ( + <> + { - setCurrentPeril(perilIndex) - setIsShowingPeril(true) - }} + perils={perils} + setCurrentPeril={setCurrentPeril} + setIsShowingPeril={setIsShowingPeril} /> - ))} - -) + {perils.length > 0 && ( + setIsShowingPeril(false)} + /> + )} + + ) +} diff --git a/src/components/Perils/PerilCollection/PerilCollection.stories.tsx b/src/components/Perils/PerilList/PerilList.stories.tsx similarity index 79% rename from src/components/Perils/PerilCollection/PerilCollection.stories.tsx rename to src/components/Perils/PerilList/PerilList.stories.tsx index 1471cc69..a227dd36 100644 --- a/src/components/Perils/PerilCollection/PerilCollection.stories.tsx +++ b/src/components/Perils/PerilList/PerilList.stories.tsx @@ -1,11 +1,11 @@ import { withKnobs } from '@storybook/addon-knobs' import React from 'react' import { brfPerils } from '../perilMockData/brf' -import { PerilCollection } from './PerilCollection' +import { PerilList } from './PerilList' export default { title: 'Components/Perils/PerilCollection', - component: PerilCollection, + component: PerilList, decorators: [withKnobs], parameters: { paddings: [ @@ -16,9 +16,9 @@ export default { } export const Default = () => ( - 1} setIsShowingPeril={() => true} /> diff --git a/src/components/Perils/PerilList/PerilList.tsx b/src/components/Perils/PerilList/PerilList.tsx new file mode 100644 index 00000000..1d1ddca8 --- /dev/null +++ b/src/components/Perils/PerilList/PerilList.tsx @@ -0,0 +1,63 @@ +import styled from '@emotion/styled' +import React from 'react' +import { LAPTOP_BP_UP, TABLET_BP_UP } from 'components/blockHelpers' +import { PerilItem } from 'components/Perils/PerilItem/PerilItem' +import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps' +import { Peril } from '../types' + +interface Props { + color: minimalColorComponentColors + perils: ReadonlyArray + setCurrentPeril: (index: number) => void + setIsShowingPeril: (isShowingPeril: boolean) => void +} + +const Wrapper = styled.div` + width: 100%; + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin-left: -0.5rem; + + ${TABLET_BP_UP} { + margin-left: -1rem; + } + + & > * { + width: calc(50% - 0.5rem); + margin-left: 0.5rem; + margin-bottom: 0.5rem; + + ${TABLET_BP_UP} { + width: calc(100% / 3 - 1rem); + margin-left: 1rem; + margin-bottom: 1rem; + } + + ${LAPTOP_BP_UP} { + width: calc(25% - 1rem); + } + } +` + +export const PerilList: React.FC = ({ + color, + perils, + setCurrentPeril, + setIsShowingPeril, +}) => ( + + {perils.map((peril, perilIndex) => ( + { + setCurrentPeril(perilIndex) + setIsShowingPeril(true) + }} + /> + ))} + +) From c0af1ccf883bfcdddafcec6781fb153700a69808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 15:21:43 +0200 Subject: [PATCH 05/12] Refactor Perils component to recieve a collection of perils and render with Tabs --- src/components/Perils/index.tsx | 57 +++++++++++++-------------------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/src/components/Perils/index.tsx b/src/components/Perils/index.tsx index 12f50811..5a049ca4 100644 --- a/src/components/Perils/index.tsx +++ b/src/components/Perils/index.tsx @@ -1,48 +1,37 @@ -import React, { useState } from 'react' +import React, { useMemo } from 'react' import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps' import { GlobalStory } from 'storyblok/StoryContainer' -import { LocaleData } from 'l10n/locales' -import { usePerils } from './data/usePerils' +import { Tabs } from '../Tabs/Tabs' import { PerilCollection } from './PerilCollection/PerilCollection' -import { PerilModal } from './PerilModal/PerilModal' -import { TypeOfContract } from './types' +import { PerilsCollection } from './types' type Props = { color?: minimalColorComponentColors - insuranceType: TypeOfContract - localeIsoCode: LocaleData['iso'] + perilsCollections: PerilsCollection[] story: GlobalStory } export const Perils: React.FC = ({ - insuranceType, - localeIsoCode, - story, color = 'standard', + perilsCollections, + story, }) => { - const perils = usePerils(insuranceType, localeIsoCode) - - const [isShowingPeril, setIsShowingPeril] = useState(false) - const [currentPeril, setCurrentPeril] = useState(0) - - return ( - <> - - {perils.length > 0 && ( - setIsShowingPeril(false)} - /> - )} - + const tabItems = useMemo( + () => + perilsCollections.map((perilsCollection: any) => ({ + id: perilsCollection.id, + name: perilsCollection.label, + content: ( + + ), + })), + [color, perilsCollections, story], ) + + return } From 7c6b7048945f53369c642732e61dc878c8db34d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 15:22:12 +0200 Subject: [PATCH 06/12] Update Perils story --- src/components/Perils/Perils.stories.tsx | 47 ++++++++---------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/src/components/Perils/Perils.stories.tsx b/src/components/Perils/Perils.stories.tsx index 10201fa8..2a8c6dcc 100644 --- a/src/components/Perils/Perils.stories.tsx +++ b/src/components/Perils/Perils.stories.tsx @@ -1,10 +1,9 @@ -import { select, withKnobs } from '@storybook/addon-knobs' +import { withKnobs } from '@storybook/addon-knobs' import React from 'react' import { globalStoryMock } from 'utils/storybook' -import { locales } from 'l10n/locales' -import { fallbackLocale } from 'l10n/l10n-utils' -import { TypeOfContract } from './types' -import { Perils } from './' +import { mockPerils } from './perilMockData/multiplePromises' +import { brfPerils } from './perilMockData/brf' +import { Perils } from '.' export default { title: 'Components/Perils/Perils', @@ -12,35 +11,21 @@ export default { decorators: [withKnobs], parameters: { paddings: [ - { name: 'Medium', value: '16px', default: true }, - { name: 'Medium', value: '32px' }, + { name: 'Medium', value: '16px' }, + { name: 'Medium', value: '32px', default: true }, ], + layout: 'centered', }, } -const types: TypeOfContract[] = [ - 'SE_HOUSE', - 'SE_APARTMENT_BRF', - 'SE_APARTMENT_RENT', - 'SE_APARTMENT_STUDENT_BRF', - 'SE_APARTMENT_STUDENT_RENT', - 'NO_HOME_CONTENT_OWN', - 'NO_HOME_CONTENT_RENT', - 'NO_HOME_CONTENT_YOUTH_OWN', - 'NO_HOME_CONTENT_YOUTH_RENT', - 'NO_TRAVEL', - 'NO_TRAVEL_YOUTH', - 'NO_HOUSE', - 'DK_HOME_CONTENT', -] - -const localesArr = Object.values(locales) -const localeIsoCodes = localesArr.map((obj) => obj.iso) - export const Default = () => ( - +
+ +
+) + +export const MultiplePromises = () => ( +
+ +
) From 9196894cda3b078274b968800fea43874ce0e31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Tue, 3 May 2022 17:13:49 +0200 Subject: [PATCH 07/12] Update usePerils hook to fetch multiple contract types and return an array --- src/components/Perils/data/usePerils.ts | 84 ++++++++++++++----------- 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/src/components/Perils/data/usePerils.ts b/src/components/Perils/data/usePerils.ts index 3b44d877..d211057d 100644 --- a/src/components/Perils/data/usePerils.ts +++ b/src/components/Perils/data/usePerils.ts @@ -17,50 +17,62 @@ const getGiraffeEndpoint = (): string => { return (window as any).GIRAFFE_ENDPOINT } -export const usePerils = (insuranceType: TypeOfContract, localeIso: Locale) => { - const [perils, setPerils] = useState<[] | Peril[]>([]) +const perilsQuery = ` +query Perils($typeOfContract: TypeOfContract!, $localeIso: Locale!) { + contractPerils(contractType: $typeOfContract, locale: $localeIso) { + title + description + covered + info + icon { + variants { + light { + svgUrl + } + } + } + } + } +` + +export const usePerils = ( + insuranceTypes: TypeOfContract[], + localeIso: Locale, +) => { + const [perils, setPerils] = useState<[] | Peril[][]>([]) useEffect(() => { const fetchPerils = async () => { const url = getGiraffeEndpoint() + const perilsArray: Peril[][] = [] - const data = { - operationName: 'Perils', - variables: { - typeOfContract: insuranceType, - localeIso, - }, - query: ` - query Perils($typeOfContract: TypeOfContract!, $localeIso: Locale!) { - contractPerils(contractType: $typeOfContract, locale: $localeIso) { - title - description - covered - info - icon { - variants { - light { - svgUrl - } - } - } - } - } - `, - } - const perilsRequest = await axios.post(url, data, { - withCredentials: false, - headers: { - Accept: '*/*', - 'content-type': 'application/json', - }, - }) - const perilsData = perilsRequest.data.data.contractPerils - setPerils(perilsData) + await Promise.all( + insuranceTypes.map(async (insuranceType) => { + const data = { + operationName: 'Perils', + variables: { + typeOfContract: insuranceType, + localeIso, + }, + query: perilsQuery, + } + + const perilsRequest = await axios.post(url, data, { + withCredentials: false, + headers: { + Accept: '*/*', + 'content-type': 'application/json', + }, + }) + + perilsArray.push(perilsRequest.data.data.contractPerils) + }), + ) + setPerils(perilsArray) } fetchPerils() - }, [insuranceType, localeIso]) + }, []) return perils } From 209ac71d8e436dd6ecbffa6b1cbc9ec4042c2706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Wed, 4 May 2022 10:04:53 +0200 Subject: [PATCH 08/12] Refactor PerilsBlock to fetch perils and pass down PerilsCollections --- src/blocks/PerilsBlock/PerilsBlock.tsx | 51 +++++++++++--------------- src/components/Perils/index.tsx | 2 +- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/blocks/PerilsBlock/PerilsBlock.tsx b/src/blocks/PerilsBlock/PerilsBlock.tsx index 14f5ddf5..92797e4a 100644 --- a/src/blocks/PerilsBlock/PerilsBlock.tsx +++ b/src/blocks/PerilsBlock/PerilsBlock.tsx @@ -1,22 +1,26 @@ import styled from '@emotion/styled' -import React, { useState } from 'react' +import React from 'react' import { useLocale } from 'context/LocaleContext' import { BaseBlockProps } from 'blocks/BaseBlockProps' import { ContentWrapper as OriginalContentWrapper, SectionWrapper, } from 'components/blockHelpers' -import { Perils } from 'components/Perils' -import { TypeOfContract } from 'components/Perils/types' -import { Select } from 'components/Select/Select' +import { + Peril, + PerilsCollection, + TypeOfContract, +} from 'components/Perils/types' import { GlobalStoryContainer } from 'storyblok/StoryContainer' +import { Perils } from 'components/Perils' +import { usePerils } from 'components/Perils/data/usePerils' -export interface ContractOption { +export type ContractOption = { label: string value: TypeOfContract } -interface PerilsBlockProps extends BaseBlockProps { +export type PerilsBlockProps = BaseBlockProps & { insurance_types: ContractOption[] } @@ -24,46 +28,35 @@ const ContentWrapper = styled(OriginalContentWrapper)` max-width: calc(784px + 2rem); ` -const SelectInsurance = styled(Select)` - max-width: 16rem; - margin: 0 auto 5rem; -` - export const PerilsBlock: React.FC = ({ - _uid, color, index, size, insurance_types, }) => { const { currentLocale } = useLocale() - const [currentInsurance, setCurrentInsurance] = useState( - insurance_types[0].value, + const insuranceTypes = insurance_types.map( + (insuranceType) => insuranceType.value, ) + const perils = usePerils(insuranceTypes, currentLocale.iso) - const onChangeHandler = (option: any) => { - setCurrentInsurance(option.value) - } + const perilsCollections = perils.map( + (perilItems: Peril[], i: number): PerilsCollection => ({ + id: insurance_types[i].value, + label: insurance_types[i].label, + items: perilItems, + }), + ) return ( {({ globalStory }) => ( - {insurance_types.length > 1 && ( - - )} - {currentInsurance && ( + {perilsCollections.length > 0 && ( )} diff --git a/src/components/Perils/index.tsx b/src/components/Perils/index.tsx index 5a049ca4..d39d387e 100644 --- a/src/components/Perils/index.tsx +++ b/src/components/Perils/index.tsx @@ -18,7 +18,7 @@ export const Perils: React.FC = ({ }) => { const tabItems = useMemo( () => - perilsCollections.map((perilsCollection: any) => ({ + perilsCollections.map((perilsCollection: PerilsCollection) => ({ id: perilsCollection.id, name: perilsCollection.label, content: ( From 58edf86c7864e1fd0844373bef8215e9354e0cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Wed, 4 May 2022 17:10:06 +0200 Subject: [PATCH 09/12] Update types --- src/components/Perils/PerilList/PerilList.tsx | 6 +++--- src/components/Perils/types.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Perils/PerilList/PerilList.tsx b/src/components/Perils/PerilList/PerilList.tsx index 1d1ddca8..0e5aace2 100644 --- a/src/components/Perils/PerilList/PerilList.tsx +++ b/src/components/Perils/PerilList/PerilList.tsx @@ -5,7 +5,7 @@ import { PerilItem } from 'components/Perils/PerilItem/PerilItem' import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps' import { Peril } from '../types' -interface Props { +type Props = { color: minimalColorComponentColors perils: ReadonlyArray setCurrentPeril: (index: number) => void @@ -40,12 +40,12 @@ const Wrapper = styled.div` } ` -export const PerilList: React.FC = ({ +export const PerilList = ({ color, perils, setCurrentPeril, setIsShowingPeril, -}) => ( +}: Props) => ( {perils.map((peril, perilIndex) => ( Date: Thu, 5 May 2022 09:51:53 +0200 Subject: [PATCH 10/12] Update dependency array for usePerils --- src/blocks/PerilsBlock/PerilsBlock.tsx | 9 +++++---- src/components/Perils/data/usePerils.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blocks/PerilsBlock/PerilsBlock.tsx b/src/blocks/PerilsBlock/PerilsBlock.tsx index 92797e4a..cadbefe1 100644 --- a/src/blocks/PerilsBlock/PerilsBlock.tsx +++ b/src/blocks/PerilsBlock/PerilsBlock.tsx @@ -1,5 +1,5 @@ import styled from '@emotion/styled' -import React from 'react' +import React, { useMemo } from 'react' import { useLocale } from 'context/LocaleContext' import { BaseBlockProps } from 'blocks/BaseBlockProps' import { @@ -35,11 +35,12 @@ export const PerilsBlock: React.FC = ({ insurance_types, }) => { const { currentLocale } = useLocale() - const insuranceTypes = insurance_types.map( - (insuranceType) => insuranceType.value, + const insuranceTypes = useMemo( + () => insurance_types.map((insuranceType) => insuranceType.value), + [insurance_types], ) - const perils = usePerils(insuranceTypes, currentLocale.iso) + const perils = usePerils(insuranceTypes, currentLocale.iso) const perilsCollections = perils.map( (perilItems: Peril[], i: number): PerilsCollection => ({ id: insurance_types[i].value, diff --git a/src/components/Perils/data/usePerils.ts b/src/components/Perils/data/usePerils.ts index d211057d..549cf47a 100644 --- a/src/components/Perils/data/usePerils.ts +++ b/src/components/Perils/data/usePerils.ts @@ -72,7 +72,7 @@ export const usePerils = ( } fetchPerils() - }, []) + }, [insuranceTypes, localeIso]) return perils } From 893f83e46aed5167663d597cc717e55a9f996f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Fri, 6 May 2022 10:39:09 +0200 Subject: [PATCH 11/12] Fix responsive styling for Underline --- src/components/Tabs/Underline.tsx | 33 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/Tabs/Underline.tsx b/src/components/Tabs/Underline.tsx index f652d4a9..822123d9 100644 --- a/src/components/Tabs/Underline.tsx +++ b/src/components/Tabs/Underline.tsx @@ -1,25 +1,24 @@ import React from 'react' import { motion } from 'framer-motion' import { colorsV3 } from '@hedviginsurance/brand' -// import { useMediaQuery } from 'react-responsive' -// import { BREAKPOINTS } from 'utils/mediaQueries' +import styled from '@emotion/styled' +import { LAPTOP_BP_UP } from '../blockHelpers' export const UNDERLINE_HEIGHT = '2px' -export const UnderlineComponent: React.FC = () => { - // const isDesktop = useMediaQuery({ minWidth: BREAKPOINTS.mediumScreen }) +const Line = styled(motion.div)` + height: ${UNDERLINE_HEIGHT}; + background-color: ${colorsV3.gray900}; + position: absolute; + bottom: 0; + width: calc(100% - 1rem); + z-index: 1; + + ${LAPTOP_BP_UP} { + width: calc(100% - 2.5rem); + } +` - return ( - - ) +export const UnderlineComponent: React.FC = () => { + return } From 07c5228dc4705aa2fb9e4f5d22f0d683d98b11ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20E=C3=A9n?= Date: Fri, 6 May 2022 10:40:14 +0200 Subject: [PATCH 12/12] Fix bad import --- src/components/Perils/PerilList/PerilList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Perils/PerilList/PerilList.tsx b/src/components/Perils/PerilList/PerilList.tsx index 0e5aace2..11350c8d 100644 --- a/src/components/Perils/PerilList/PerilList.tsx +++ b/src/components/Perils/PerilList/PerilList.tsx @@ -2,7 +2,7 @@ import styled from '@emotion/styled' import React from 'react' import { LAPTOP_BP_UP, TABLET_BP_UP } from 'components/blockHelpers' import { PerilItem } from 'components/Perils/PerilItem/PerilItem' -import { minimalColorComponentColors } from 'src/blocks/BaseBlockProps' +import { minimalColorComponentColors } from 'blocks/BaseBlockProps' import { Peril } from '../types' type Props = {