From 89bf1bf8e816304535497c90f98eb6ee968a9c75 Mon Sep 17 00:00:00 2001 From: Brooke Date: Mon, 27 Jun 2022 11:11:56 -0700 Subject: [PATCH] PROD-2195 #comment remove obsolete legacy files #time 15m --- src/actions/index.js | 15 ---- src/actions/myWork.js | 34 -------- .../data/spec-templates/data-exploration.json | 4 - .../data/spec-templates/website-design.json | 4 - src/assets/images/arrow-left-turquoise.svg | 3 - src/assets/images/eye.svg | 3 - src/assets/images/icon-active-indicator.svg | 3 - src/assets/images/icon-check.svg | 1 - src/assets/images/icon-close.svg | 3 - src/assets/images/icon-hint.svg | 3 - src/assets/images/icon-star-empty.svg | 10 --- src/assets/images/icon-star-filled.svg | 10 --- src/assets/images/icon-star.svg | 3 - src/assets/images/icon-warning.svg | 3 - src/assets/images/review-and-submit-icon.svg | 4 - src/assets/images/save-for-later-icon2.png | Bin 3159 -> 0 bytes src/components/DateInput/index.jsx | 81 ------------------ src/components/DateInput/styles.module.scss | 64 -------------- .../FormElements/FormInputNumber/index.jsx | 22 ----- .../FormInputNumber/styles.module.scss | 25 ------ .../FormElements/FormPasswordField/index.jsx | 38 -------- .../FormPasswordField/styles.module.scss | 36 -------- .../PageElements/PageCard/index.jsx | 38 -------- .../PageElements/PageCard/styles.module.scss | 52 ----------- src/components/PageElements/PageH1/index.jsx | 23 ----- .../PageElements/PageH1/styles.module.scss | 10 --- src/components/Rating/index.jsx | 30 ------- src/components/Rating/styles.module.scss | 15 ---- src/components/TabSelector/Tab/index.jsx | 38 -------- .../TabSelector/Tab/styles.module.scss | 49 ----------- src/components/TabSelector/index.jsx | 37 -------- src/components/TabSelector/styles.module.scss | 9 -- src/hooks/useMatchSomeRoute.js | 26 ------ src/services/index.js | 15 ---- src/services/profile.js | 47 ---------- src/utils/formatters.js | 13 --- src/utils/hooks/useTargetSize.js | 34 -------- 37 files changed, 805 deletions(-) delete mode 100644 src/actions/index.js delete mode 100644 src/actions/myWork.js delete mode 100644 src/assets/data/spec-templates/data-exploration.json delete mode 100644 src/assets/data/spec-templates/website-design.json delete mode 100644 src/assets/images/arrow-left-turquoise.svg delete mode 100644 src/assets/images/eye.svg delete mode 100644 src/assets/images/icon-active-indicator.svg delete mode 100644 src/assets/images/icon-check.svg delete mode 100644 src/assets/images/icon-close.svg delete mode 100644 src/assets/images/icon-hint.svg delete mode 100644 src/assets/images/icon-star-empty.svg delete mode 100644 src/assets/images/icon-star-filled.svg delete mode 100644 src/assets/images/icon-star.svg delete mode 100644 src/assets/images/icon-warning.svg delete mode 100644 src/assets/images/review-and-submit-icon.svg delete mode 100644 src/assets/images/save-for-later-icon2.png delete mode 100644 src/components/DateInput/index.jsx delete mode 100644 src/components/DateInput/styles.module.scss delete mode 100644 src/components/FormElements/FormInputNumber/index.jsx delete mode 100644 src/components/FormElements/FormInputNumber/styles.module.scss delete mode 100644 src/components/FormElements/FormPasswordField/index.jsx delete mode 100644 src/components/FormElements/FormPasswordField/styles.module.scss delete mode 100644 src/components/PageElements/PageCard/index.jsx delete mode 100644 src/components/PageElements/PageCard/styles.module.scss delete mode 100644 src/components/PageElements/PageH1/index.jsx delete mode 100644 src/components/PageElements/PageH1/styles.module.scss delete mode 100644 src/components/Rating/index.jsx delete mode 100644 src/components/Rating/styles.module.scss delete mode 100644 src/components/TabSelector/Tab/index.jsx delete mode 100644 src/components/TabSelector/Tab/styles.module.scss delete mode 100644 src/components/TabSelector/index.jsx delete mode 100644 src/components/TabSelector/styles.module.scss delete mode 100644 src/hooks/useMatchSomeRoute.js delete mode 100644 src/services/index.js delete mode 100644 src/services/profile.js delete mode 100644 src/utils/formatters.js delete mode 100644 src/utils/hooks/useTargetSize.js diff --git a/src/actions/index.js b/src/actions/index.js deleted file mode 100644 index f479bfd76..000000000 --- a/src/actions/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import autoSave from "./autoSave"; -import challenge from "./challenge"; -import form from "./form"; -import progress from "./progress"; -import profile from "./profile"; -import myWork from "./myWork"; - -export default { - autoSave, - challenge, - form, - progress, - profile, - myWork, -}; diff --git a/src/actions/myWork.js b/src/actions/myWork.js deleted file mode 100644 index e318db11d..000000000 --- a/src/actions/myWork.js +++ /dev/null @@ -1,34 +0,0 @@ -import { ACTIONS } from "constants/"; - -/** - * Creates an action denoting the failure to get user works. - * - * @param {Object} error error object - * @returns {Object} - */ -export const loadWorksError = (error) => ({ - type: ACTIONS.MY_WORK.LOAD_WORKS_ERROR, - payload: error, -}); - -/** - * Creates an action denoting the start of loading user's works. - * - * @param {Object} cancelSource axios' cancel source object - * @returns {Object} - */ -export const loadWorksPending = (cancelSource) => ({ - type: ACTIONS.MY_WORK.LOAD_WORKS_PENDING, - payload: cancelSource, -}); - -/** - * Creates an action denoting the successful load of user's works. - * - * @param {Array} works user's works - * @returns {Object} - */ -export const loadWorksSuccess = (works) => ({ - type: ACTIONS.MY_WORK.LOAD_WORKS_SUCCESS, - payload: works, -}); diff --git a/src/assets/data/spec-templates/data-exploration.json b/src/assets/data/spec-templates/data-exploration.json deleted file mode 100644 index c75b10375..000000000 --- a/src/assets/data/spec-templates/data-exploration.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "## Goals & Descriptions \n\n {{goals}} \n\n {{shareableLinks}} ## Final Submission Guidelines \n\n Please submit a zip file containing your analysis/solution." -} - diff --git a/src/assets/data/spec-templates/website-design.json b/src/assets/data/spec-templates/website-design.json deleted file mode 100644 index 1edb60721..000000000 --- a/src/assets/data/spec-templates/website-design.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "{{websitePurpose.description}} \n\n## Full Description & Project Guide\n\n### UNIQUE PAGES DESCRIBED\n\n{{basicInfo.numberOfPages}} \n\n### DEVICE TYPES REQUIRED: \n\n{{basicInfo.numberOfDevices}}. Note: Each unique page/screen should be designed for the devices listed below.\n\n{{basicInfo.supportedDevices}} \n\n### INDUSTRY\n\n{{websitePurpose.industry}} \n\n### USERS\n\n {{websitePurpose.userStory}} \n\n ### EXISTING WEBSITE\n\n {{websitePurpose.existingWebsite}} \n\n## Required Screens\n\n{{pageDetails}} \n\n\n## Branding\n\n### STYLE & THEME:\n\n{{branding.theme}} \n\n {{branding.websitesForInspiration}} \n\n### COLOR PALETTE:\n\nPreferred: {{branding.colorOption}} \n\nSpecific Color (required): {{branding.specificColor}} \n\n### FONTS:\n\nPreferred: {{branding.fontOption}} \n\nFont files uploaded: {{branding.fontUrl}} \n\nFont special instructions: {{branding.fontUsageDescription}} \n\n### OTHER ASSETS:\n\nFiles uploaded: {{branding.assetsUrl}} \n\n ### WHAT TO AVOID \n\n {{branding.anythingToAvoid}} \n\n### STOCK PHOTOS:\n\n{{branding.stockPhotos}} \n\n### SOURCE FILES / DELIVERABLES:\n\n {{branding.selectedDeliverableOption}} \n\n" -} - diff --git a/src/assets/images/arrow-left-turquoise.svg b/src/assets/images/arrow-left-turquoise.svg deleted file mode 100644 index c3b7a2c87..000000000 --- a/src/assets/images/arrow-left-turquoise.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/eye.svg b/src/assets/images/eye.svg deleted file mode 100644 index d0bee3e93..000000000 --- a/src/assets/images/eye.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/icon-active-indicator.svg b/src/assets/images/icon-active-indicator.svg deleted file mode 100644 index 2a0678f7d..000000000 --- a/src/assets/images/icon-active-indicator.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/icon-check.svg b/src/assets/images/icon-check.svg deleted file mode 100644 index 15d7ab5e8..000000000 --- a/src/assets/images/icon-check.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/images/icon-close.svg b/src/assets/images/icon-close.svg deleted file mode 100644 index 67901b4be..000000000 --- a/src/assets/images/icon-close.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/icon-hint.svg b/src/assets/images/icon-hint.svg deleted file mode 100644 index a02551bf7..000000000 --- a/src/assets/images/icon-hint.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/icon-star-empty.svg b/src/assets/images/icon-star-empty.svg deleted file mode 100644 index 4bb1d0e80..000000000 --- a/src/assets/images/icon-star-empty.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/src/assets/images/icon-star-filled.svg b/src/assets/images/icon-star-filled.svg deleted file mode 100644 index bd6e884cf..000000000 --- a/src/assets/images/icon-star-filled.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/src/assets/images/icon-star.svg b/src/assets/images/icon-star.svg deleted file mode 100644 index f1e70641f..000000000 --- a/src/assets/images/icon-star.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/icon-warning.svg b/src/assets/images/icon-warning.svg deleted file mode 100644 index d5d55ffb8..000000000 --- a/src/assets/images/icon-warning.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/assets/images/review-and-submit-icon.svg b/src/assets/images/review-and-submit-icon.svg deleted file mode 100644 index 28ec4632b..000000000 --- a/src/assets/images/review-and-submit-icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/assets/images/save-for-later-icon2.png b/src/assets/images/save-for-later-icon2.png deleted file mode 100644 index ab00ff778a1219080a72d3481053136481b3826f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3159 zcmV-d45;&oP)IvMg1h3J*IHn54ER=esj!xI5lm?|OG^ zE8GtaGoHtNe)rsS&V6iv3V?7^W4P!Gs;3}DDL@PORus3L!@wYpBVf@bD;Ve<30fBh znqqOv69JkaK-l0YZQ%q}^PkmZV2}ftH@!^c!}$<7XYy*KeVrW1I;(gFEsHFq=bv6g z<>9$hF~3~hE9JxB@y6i82Xy1!ZFRnUD?vTi`l%~^l|JLYHN-}Ws5w^>=S1Fb>}uSt zleUTpyS=8K7Bg85Q4MlI`zIIaWN#O>_xH*z%L-ES-R4+xwqayNUY53z&@i300!o*q zm5Y|r8?_Be${HBtgX;sg>EQV@Oyq94b&aL)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&|V{Gu`BnbdwXIZdEZI7Kkv}r`}$`7Ad0yk)rP|17cbOYZ2C&Auxf2B7+cvt<+#BIL2C)Ski{qcWL zWoKhO2htiaKd55hBf7BX#wq&;RiNWC-?rY_8;fQ7ChMQF3XahEfU{T=OK`9upV`;U zAYWiacRvq|bvUbNEQ@+aL$taeKV_w3?vBPLD@eQLZ%hVXv$V?BWgiA#J;>_mgG^dk zdk7C#(4xb)_oY`8yqL((w?@=nzRs4Yfc^8W_HHmTalB01ufgE)h0JvZS+U>&Q*XPR ziTi+%b~r?b)C|WQkk1ciN3hQsi}@`9=a(@J46=qrolL$96Ctf&!sOK3 diff --git a/src/components/DateInput/index.jsx b/src/components/DateInput/index.jsx deleted file mode 100644 index e5d93747b..000000000 --- a/src/components/DateInput/index.jsx +++ /dev/null @@ -1,81 +0,0 @@ -/** - * DateInput - * - * Date Input control. - */ -import React, { createRef, useState } from "react"; -import PT from "prop-types"; -import DatePicker from "react-datepicker"; -import cn from "classnames"; -import "react-datepicker/dist/react-datepicker.css"; -import CalendarIcon from "../../assets/images/icon-calendar.svg"; -import ArrowIcon from "../../assets/images/icon-arrow.svg"; -import styles from "./styles.module.scss"; -import moment from "moment"; - -const DateInput = (props) => { - const [open, setOpen] = useState(false); - const calendarRef = createRef(); - return ( -
-
calendarRef.current.setOpen(true)} - styleName={cn("styles.icon", "styles.icon-calendar")} - role="button" - tabIndex={0} - > - -
- { - setOpen(false); - }} - onFocus={props.onFocus} - showYearDropdown - onCalendarOpen={() => setOpen(true)} - maxDate={ - props.allowFutureDate ? null : moment().subtract(1, "days").toDate() - } - disabled={props.disabled} - /> -
calendarRef.current.setOpen(true)} - role="button" - tabIndex={0} - > - -
-
- ); -}; - -DateInput.propTypes = { - value: PT.string, - onChange: PT.func.isRequired, - placeholder: PT.string, - onBlur: PT.func, - onFocus: PT.func, - className: PT.string, - style2: PT.bool, - disabled: PT.bool, - allowFutureDate: PT.bool, -}; - -export default DateInput; diff --git a/src/components/DateInput/styles.module.scss b/src/components/DateInput/styles.module.scss deleted file mode 100644 index 6949cde2a..000000000 --- a/src/components/DateInput/styles.module.scss +++ /dev/null @@ -1,64 +0,0 @@ -@import "styles/include"; - -.datepicker-wrapper { - position: relative; - padding: 0 10px; - .icon { - position: absolute; - display: flex; - padding: 8px 0 8px 4px; - align-items: center; - & > svg { - width: 20px; - height: 20px; - } - } - .icon-calendar { - left: 8px; - cursor: pointer; - } - - .icon-arrow { - right: 8px; - top: 0; - & > svg { - color: hsl(0, 0%, 80%); - } - &:hover { - & > svg { - color: hsl(0, 0%, 60%); - } - } - &.icon-arrow-open { - & > svg { - color: hsl(0, 0%, 40%); - } - } - } - - &.error { - input { - border-color: #fe665d; - } - } - - & > div:nth-child(2) { - margin-left: 24px; - } - - &.style2 input { - border: none !important; - box-shadow: none !important; - margin-bottom: 0 !important; - font-size: 18px; - &::placeholder { - color: #aaa; - font-size: 18px; - text-transform: none !important; - } - } -} - -.datepicker-wrapper > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) { - z-index: 100; -} diff --git a/src/components/FormElements/FormInputNumber/index.jsx b/src/components/FormElements/FormInputNumber/index.jsx deleted file mode 100644 index 253380384..000000000 --- a/src/components/FormElements/FormInputNumber/index.jsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * FormInputNumber - * - * Form Input Type=text - */ -import cn from "classnames"; -import React from "react"; -import "./styles.module.scss"; - -const FormInputNumber = ({ styleName, ...props }) => { - return ( - - ); -}; - -FormInputNumber.propTypes = {}; - -export default FormInputNumber; diff --git a/src/components/FormElements/FormInputNumber/styles.module.scss b/src/components/FormElements/FormInputNumber/styles.module.scss deleted file mode 100644 index 2724e6ac4..000000000 --- a/src/components/FormElements/FormInputNumber/styles.module.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import "styles/include"; - -.form-input-number { - background-color: #ffffff !important; - box-sizing: border-box !important; - color: #444 !important; - font-size: 18px !important; - height: 32px !important; - outline: none !important; - border: 0 !important; - padding: 0 15px !important; - width: 100% !important; - &::placeholder { - color: #aaaaaa !important; - font-size: 18px !important; - text-transform: none !important; - } - &:focus { - box-shadow: none !important; - } - - &:disabled { - background-color: $grey-bg !important; - } -} diff --git a/src/components/FormElements/FormPasswordField/index.jsx b/src/components/FormElements/FormPasswordField/index.jsx deleted file mode 100644 index b55ce732a..000000000 --- a/src/components/FormElements/FormPasswordField/index.jsx +++ /dev/null @@ -1,38 +0,0 @@ -/** - * FormPasswordField - * - * Form Input Type=text - */ -import cn from "classnames"; -import React, { useState } from "react"; -import EyeIcon from "../../../assets/images/eye.svg"; -import "./styles.module.scss"; - -const FormPasswordField = ({ styleName, ...props }) => { - const [inputType, setInputType] = useState("password"); - - const handleViewPassword = () => { - setInputType(inputType === "password" ? "text" : "password"); - }; - - return ( - <> - -
- -
- - ); -}; - -FormPasswordField.propTypes = {}; - -export default FormPasswordField; diff --git a/src/components/FormElements/FormPasswordField/styles.module.scss b/src/components/FormElements/FormPasswordField/styles.module.scss deleted file mode 100644 index bb55e970a..000000000 --- a/src/components/FormElements/FormPasswordField/styles.module.scss +++ /dev/null @@ -1,36 +0,0 @@ -@import "styles/include"; - -.form-password-field { - background-color: #ffffff !important; - box-sizing: border-box !important; - color: #444 !important; - font-size: 18px !important; - height: 32px !important; - outline: none !important; - border: 0 !important; - padding: 0 15px !important; - width: 100% !important; - &::placeholder { - color: #aaaaaa !important; - font-size: 18px !important; - text-transform: none !important; - } - &:focus { - box-shadow: none !important; - } - - &:disabled { - background-color: $grey-bg !important; - } - - &::-ms-reveal { - display: none; - } -} - -.eye-icon { - position: absolute; - right: 9px; - top: 37px; - cursor: pointer; -} diff --git a/src/components/PageElements/PageCard/index.jsx b/src/components/PageElements/PageCard/index.jsx deleted file mode 100644 index 5851a9396..000000000 --- a/src/components/PageElements/PageCard/index.jsx +++ /dev/null @@ -1,38 +0,0 @@ -/** - * PageCard - * - * page card - */ -import React from "react"; -import PT from "prop-types"; -import cn from "classnames"; -import "./styles.module.scss"; - -const PageCard = ({ - colorStyle = "primary", - hasImage = false, - children, - styleName, - ...props -}) => { - return ( -
- {children} -
- ); -}; - -PageCard.propTypes = { - children: PT.node, - hasImage: PT.bool, -}; - -export default PageCard; diff --git a/src/components/PageElements/PageCard/styles.module.scss b/src/components/PageElements/PageCard/styles.module.scss deleted file mode 100644 index 2fac336a3..000000000 --- a/src/components/PageElements/PageCard/styles.module.scss +++ /dev/null @@ -1,52 +0,0 @@ -@import "styles/include"; - -.page-card { - padding: 10px 30px; - color: white; - border-radius: 8px; - overflow: hidden; - height: 200px; - @include mobile { - height: auto; - margin-bottom: 20px; - padding-right: 20px; - } - - p { - color: white; - } - &.color-primary { - background: linear-gradient( - 90deg, - rgba(101, 35, 133, 1), - rgba(140, 56, 76, 1) - ); - } - &.color-secondary { - background: linear-gradient( - 90deg, - rgba(5, 106, 135, 1), - rgba(3, 131, 104, 1) - ); - } - &.has-image { - display: flex; - align-items: center; - @include desktop { - padding: 0; - padding-right: 10px; - } - @include mobile { - padding-top: 0; - flex-direction: column; - text-align: center; - } - } - & img { - height: 100%; - object-fit: contain; - @include desktop { - margin-right: 31px; - } - } -} diff --git a/src/components/PageElements/PageH1/index.jsx b/src/components/PageElements/PageH1/index.jsx deleted file mode 100644 index 746a944bc..000000000 --- a/src/components/PageElements/PageH1/index.jsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * PageH1 - * - * page content heading 1 - */ -import React from "react"; -import PT from "prop-types"; -import cn from "classnames"; -import "./styles.module.scss"; - -const PageH1 = ({ children, styleName, ...props }) => { - return ( -

- {children} -

- ); -}; - -PageH1.propTypes = { - children: PT.node, -}; - -export default PageH1; diff --git a/src/components/PageElements/PageH1/styles.module.scss b/src/components/PageElements/PageH1/styles.module.scss deleted file mode 100644 index 407d55ade..000000000 --- a/src/components/PageElements/PageH1/styles.module.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import "styles/include"; - -.page-h1 { - margin: 30px 0 20px 0; - @include font-barlow; - font-size: 44px; - font-weight: 410; - line-height: 40px; - text-transform: uppercase; -} diff --git a/src/components/Rating/index.jsx b/src/components/Rating/index.jsx deleted file mode 100644 index 66010f9d4..000000000 --- a/src/components/Rating/index.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react"; -import PT from "prop-types"; -import StarEmpty from "../../assets/images/icon-star-empty.svg"; -import StarFilled from "../../assets/images/icon-star-filled.svg"; -import "./styles.module.scss"; - -/** - * Displays rating as stars. - * - * @param {Object} props component properties - * @returns {JSX.Element} - */ -const Rating = ({ className, rating }) => { - const stars = []; - for (let r = 1; r <= 5; r++) { - stars.push(r <= rating ? : ); - } - return ( -
- {stars} -
- ); -}; - -Rating.propTypes = { - className: PT.string, - rating: PT.number.isRequired, -}; - -export default Rating; diff --git a/src/components/Rating/styles.module.scss b/src/components/Rating/styles.module.scss deleted file mode 100644 index f0df6cd1f..000000000 --- a/src/components/Rating/styles.module.scss +++ /dev/null @@ -1,15 +0,0 @@ -.container { - display: flex; - align-items: center; - - > svg { - flex: 0 0 auto; - width: auto; - height: 16px; - // margin-left: 10px; - - &:first-child { - margin-left: 0; - } - } -} diff --git a/src/components/TabSelector/Tab/index.jsx b/src/components/TabSelector/Tab/index.jsx deleted file mode 100644 index 4e916f81a..000000000 --- a/src/components/TabSelector/Tab/index.jsx +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Tab element - */ -import PT from "prop-types"; -import React from "react"; -import { v4 as uuidv4 } from "uuid"; -import "./styles.module.scss"; - -const Tab = ({ title, subTitle, price, onClick, selected }) => { - return ( -
-
{title}
-
{subTitle}
-
STARTING AT ${price}
-
- ); -}; - -Tab.defaultProps = { - title: "", - subTitle: "", - price: 0, -}; - -Tab.propTypes = { - title: PT.string, - subTitle: PT.string, - price: PT.number, - onClick: PT.func, -}; - -export default Tab; diff --git a/src/components/TabSelector/Tab/styles.module.scss b/src/components/TabSelector/Tab/styles.module.scss deleted file mode 100644 index f33b8083e..000000000 --- a/src/components/TabSelector/Tab/styles.module.scss +++ /dev/null @@ -1,49 +0,0 @@ -@import "styles/include"; - -.tab { - display: flex; - flex: 1 1 30%; - flex-direction: column; - border: 1px $gray-80 solid; - padding: 9px 57px 24px 57px; - border-radius: 5px; - text-align: center; - cursor: pointer; - - @include mobile { - flex: 1 1 100%; - } - - &:hover { - outline: 3px $green1 solid; - border: 0; - } - - .title { - font-size: 24px; - line-height: 24px; - font-weight: 600; - text-transform: uppercase; - padding-top: 15px; - } - - .subTitle { - padding-top: 10px; - font-size: 16px; - font-weight: 400; - } - - .price { - @include font-roboto; - font-size: 12px; - line-height: 16px; - padding-top: 10px; - text-transform: uppercase; - font-weight: 700; - } -} - -.tab-selected { - outline: 3px $green1 solid; - border: 0; -} diff --git a/src/components/TabSelector/index.jsx b/src/components/TabSelector/index.jsx deleted file mode 100644 index d3bba0127..000000000 --- a/src/components/TabSelector/index.jsx +++ /dev/null @@ -1,37 +0,0 @@ -/** - * ProgressPopup - * - * Tab Selector - */ -import PT from "prop-types"; -import React from "react"; -import { currencyFormat } from "utils/"; -import "./styles.module.scss"; -import Tab from "./Tab"; - -const TabSelector = ({ items, selectedState, handleClick = (e) => e }) => { - return ( -
- {items.map((item) => ( - handleClick(item)} - selected={selectedState === item.title} - /> - ))} -
- ); -}; - -TabSelector.defaultProps = { - items: [], -}; - -TabSelector.propTypes = { - items: PT.arrayOf(PT.shape()), - handleClick: PT.func, -}; - -export default TabSelector; diff --git a/src/components/TabSelector/styles.module.scss b/src/components/TabSelector/styles.module.scss deleted file mode 100644 index e7b9840eb..000000000 --- a/src/components/TabSelector/styles.module.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import "styles/include"; - -.tabSelector { - @include font-barlow; - display: flex; - flex-wrap: wrap; - gap: 10px; - margin-top: 30px; -} \ No newline at end of file diff --git a/src/hooks/useMatchSomeRoute.js b/src/hooks/useMatchSomeRoute.js deleted file mode 100644 index ce0b2e935..000000000 --- a/src/hooks/useMatchSomeRoute.js +++ /dev/null @@ -1,26 +0,0 @@ -import { matchPath, useLocation } from "@reach/router"; -import _ from "lodash"; - -/** - * Check if any of the passed paths match the current route. - * - * @param {string[]} paths paths of the routes - * - * @returns {{ uri: string, path: string, params: {} }} matched route params - */ -const useMatchSomeRoute = (paths) => { - const location = useLocation(); - return _.find(paths, (path) => { - const result = matchPath(path, location.pathname); - - return result - ? { - params: result.params, - uri: result.uri, - path, - } - : null; - }); -}; - -export default useMatchSomeRoute; diff --git a/src/services/index.js b/src/services/index.js deleted file mode 100644 index e022d8d82..000000000 --- a/src/services/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import challenge from "./challenge"; -import form from "./form"; -import work from "./work"; -import myWork from "./myWork"; -import payment from "./payment"; -import profile from "./profile"; - -export default { - form, - challenge, - work, - myWork, - payment, - profile, -}; diff --git a/src/services/profile.js b/src/services/profile.js deleted file mode 100644 index abad24e12..000000000 --- a/src/services/profile.js +++ /dev/null @@ -1,47 +0,0 @@ -import config from "../../config"; -import { axiosInstance as axios } from "./requestInterceptor"; - -/** - * Updates user basic information - * - * @param {String} handle user handle - * @param {String} firstName first name - * @param {String} lastName last name - * - * @returns {() => Promise} - */ -export async function updateBasicInfo(handle, firstName, lastName) { - const response = await axios.put( - `${config.API.V5}/members/${handle}`, - JSON.stringify({ - firstName, - lastName, - }) - ); - - return response?.data; -} -/** - * Update user password - * - * @param {String} userId user id - * @param {String} currentPassword user's current password - * @param {String} password user's new password - * - * @returns {() => Promise} - */ -export async function updatePasswordV3(userId, currentPassword, password) { - const response = await axios.patch( - `${config.API.V3}/users/${userId}`, - JSON.stringify({ - param: { - credential: { - currentPassword, - password, - }, - }, - }) - ); - - return response?.data; -} diff --git a/src/utils/formatters.js b/src/utils/formatters.js deleted file mode 100644 index 438cacaed..000000000 --- a/src/utils/formatters.js +++ /dev/null @@ -1,13 +0,0 @@ -import { WORK_STATUS_MAP } from "constants/index.js"; - -const rxUnderscore = /_/g; - -/** - * Formats work type. - * - * @param {string} type work type - * @returns {string} - */ -export function formatWorkType(type) { - return type.replace(rxUnderscore, " ").toLowerCase(); -} diff --git a/src/utils/hooks/useTargetSize.js b/src/utils/hooks/useTargetSize.js deleted file mode 100644 index dead9c928..000000000 --- a/src/utils/hooks/useTargetSize.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from "react"; - -export const useTargetSize = () => { - const [size, setSize] = React.useState(); - const ref = React.useRef(); - - React.useLayoutEffect(() => { - setSize(ref.current.getBoundingClientRect()); - }, []); - - React.useLayoutEffect(() => { - const targetNode = ref.current; - const resizeObserver = new ResizeObserver((entries) => { - for (const entry of entries) { - if (entry.contentBoxSize) { - const contentBoxSize = Array.isArray(entry.contentBoxSize) - ? entry.contentBoxSize[0] - : entry.contentBoxSize; - setSize({ - width: Math.floor(contentBoxSize.inlineSize), - height: Math.floor(contentBoxSize.blockSize), - }); - } - } - }); - resizeObserver.observe(targetNode); - - return () => { - resizeObserver.disconnect(); - }; - }, []); - - return [size, ref]; -};