diff --git a/.eslintrc b/.eslintrc index 4957a09..64997fb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,6 +19,7 @@ "assert": "either" }], "react/jsx-one-expression-per-line": "off", - "react/button-has-type": "off" + "react/button-has-type": "off", + "no-bitwise": "off" } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 936e26b..2bff066 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3244,6 +3244,11 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, + "@types/luxon": { + "version": "1.26.2", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-1.26.2.tgz", + "integrity": "sha512-2pvzy4LuxBMBBLAbml6PDcJPiIeZQ0Hqj3PE31IxkNI250qeoRMDovTrHXeDkIL4auvtarSdpTkLHs+st43EYQ==" + }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -3354,6 +3359,11 @@ "@types/node": "*" } }, + "@types/seedrandom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-3.0.0.tgz", + "integrity": "sha512-Jr03BtXs7v6M/wtTum2VOMLBq7R8zpjdZLynhA/IOJq83czXrnVo8iSUI05gcq8Ecq0Swt+nuoK3y2ji/TWyMA==" + }, "@types/source-list-map": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", @@ -11786,6 +11796,11 @@ "yallist": "^4.0.0" } }, + "luxon": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.26.0.tgz", + "integrity": "sha512-+V5QIQ5f6CDXQpWNICELwjwuHdqeJM1UenlZWx5ujcRMc9venvluCjFb4t5NYLhb6IhkbMVOxzVuOqkgMxee2A==" + }, "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", @@ -14718,11 +14733,6 @@ "prop-types": "^15.5.8" } }, - "react-ga": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-3.3.0.tgz", - "integrity": "sha512-o8RScHj6Lb8cwy3GMrVH6NJvL+y0zpJvKtc0+wmH7Bt23rszJmnqEQxRbyrqUzk9DTJIHoP42bfO5rswC9SWBQ==" - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -15691,6 +15701,11 @@ "ajv-keywords": "^3.5.2" } }, + "seedrandom": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", + "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", diff --git a/package.json b/package.json index b358ae9..12a4ff2 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "@types/jest": "^26.0.15", + "@types/luxon": "^1.26.2", "@types/node": "^14.14.5", "@types/react": "^16.9.53", "@types/react-custom-scrollbars": "^4.0.7", @@ -15,11 +16,13 @@ "@types/react-gtm-module": "^2.0.0", "@types/react-router-dom": "^5.1.6", "@types/react-select": "^3.1.2", + "@types/seedrandom": "^3.0.0", "@typescript-eslint/eslint-plugin": "^4.6.0", "@typescript-eslint/parser": "^4.6.0", "clsx": "^1.1.1", "eslint-config-airbnb-typescript": "^12.0.0", "lottie-web": "^5.7.6", + "luxon": "^1.26.0", "query-string": "^6.13.6", "react": "^17.0.1", "react-custom-scrollbars": "^4.2.1", @@ -30,6 +33,7 @@ "react-scripts": "^4.0.3", "react-select": "^3.1.1", "sass": "^1.32.8", + "seedrandom": "^3.0.5", "typescript": "^4.0.5", "web-vitals": "^0.2.4", "zod": "^1.11.11" diff --git a/src/App.tsx b/src/App.tsx index 0117286..27d9b2d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-d import Home from 'pages/Home'; import Auth from 'pages/Auth'; import Registration from 'pages/Registration'; +import RSVP from 'pages/RSVP'; import StaticFileRedirect from 'components/StaticFileRedirect'; import AuthenticatedRoute from 'components/AuthenticatedRoute'; @@ -23,6 +24,10 @@ function App(): JSX.Element { + + + + diff --git a/src/assets/discord_username_how_to.png b/src/assets/discord_username_how_to.png new file mode 100644 index 0000000..9792728 Binary files /dev/null and b/src/assets/discord_username_how_to.png differ diff --git a/src/components/form/Input/HelpIcon.tsx b/src/components/form/Input/HelpIcon.tsx new file mode 100644 index 0000000..d5be90e --- /dev/null +++ b/src/components/form/Input/HelpIcon.tsx @@ -0,0 +1,15 @@ +import React from 'react'; + +type PropTypes = { + color?: string; + [key: string]: unknown; +}; + +const HelpIcon = ({ color, ...props }: PropTypes): JSX.Element => ( + + + + +); + +export default HelpIcon; diff --git a/src/components/form/Input/StyledInput/index.tsx b/src/components/form/Input/StyledInput/index.tsx index a028eaa..5e42daf 100644 --- a/src/components/form/Input/StyledInput/index.tsx +++ b/src/components/form/Input/StyledInput/index.tsx @@ -1,15 +1,42 @@ -import clsx from 'clsx'; import React, { forwardRef } from 'react'; +import clsx from 'clsx'; import styles from './styles.module.scss'; type PropTypes = { className?: string; + multiline?: boolean; [key: string]: unknown; }; -const StyledInput = forwardRef(({ className, ...props }: PropTypes, ref): JSX.Element => ( - -)); +// Adapted from https://stackoverflow.com/a/46777664 +const adjustHeight = (textarea: HTMLTextAreaElement|null) => { + if (textarea) { + textarea.style.height = ''; + textarea.style.height = `${textarea.scrollHeight}px`; + } +}; + +const StyledInput = forwardRef(({ className, multiline = false, ...props }: PropTypes, ref): JSX.Element => { + if (multiline) { + return ( +