From 06290720ad3360f63caf53d1dd445ef9c17bf6c6 Mon Sep 17 00:00:00 2001 From: Adam Strojil Date: Mon, 9 Sep 2024 23:12:09 +0200 Subject: [PATCH] add responsivity-related fixes --- src/app/components/DateRange/DateRange.tsx | 4 ++-- src/app/components/DateRange/utils.tsx | 3 ++- src/app/data/AdamStrojilEnglish.ts | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/app/components/DateRange/DateRange.tsx b/src/app/components/DateRange/DateRange.tsx index 79f9223..c9969b2 100644 --- a/src/app/components/DateRange/DateRange.tsx +++ b/src/app/components/DateRange/DateRange.tsx @@ -18,11 +18,11 @@ export const DateRange = ({ const duration = calculateMonthDifference(sinceRawValue, untilRawValue); return ( -
+
{since} {until && '-'} {until} - {isDurationVisible && `(${duration})`} + {isDurationVisible && ({duration})}
); }; diff --git a/src/app/components/DateRange/utils.tsx b/src/app/components/DateRange/utils.tsx index 48dc689..29a8c28 100644 --- a/src/app/components/DateRange/utils.tsx +++ b/src/app/components/DateRange/utils.tsx @@ -1,6 +1,7 @@ import { ReactNode } from 'react'; const YEAR_AND_MONTH_REGEX = /^\d{4}-\d{2}$/; //e.g. "2023-12" +const NON_BREAKING_SPACE = '\xa0'; const parseDate = (dateString: string) => { const [year, month] = dateString.split('-').map(Number); @@ -21,7 +22,7 @@ const formatMonthYear = (dateString: string) => { const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; const monthName = months[parseInt(month, 10) - 1]; - const formattedDate = `${monthName} ${year}`; + const formattedDate = `${monthName}${NON_BREAKING_SPACE}${year}`; return formattedDate; }; diff --git a/src/app/data/AdamStrojilEnglish.ts b/src/app/data/AdamStrojilEnglish.ts index 5aadb98..8dbaca2 100644 --- a/src/app/data/AdamStrojilEnglish.ts +++ b/src/app/data/AdamStrojilEnglish.ts @@ -241,13 +241,13 @@ export const DATA: PersonData = { skills: [ 'flexibility', 'responsibility', - 'dedication', - 'open-minded', + 'independence', 'fairplay', 'teamwork', - 'independence', 'humour', - 'curiousity', + 'dedication', + 'curiosity', + 'open-mindedness', ], }, {