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 ab00ff778..000000000 Binary files a/src/assets/images/save-for-later-icon2.png and /dev/null differ 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]; -};