Skip to content

Commit

Permalink
Merge pull request #537 from mysteriumnetwork/fix/legacy-browser-comp…
Browse files Browse the repository at this point in the history
…atibility

Fix JS compatibility issue for legacy browsers
  • Loading branch information
mingaila committed Jun 12, 2024
2 parents b1c5d74 + ad1695b commit 3fad7da
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 37 deletions.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
## Running

### Prerequisites
- NodeJS >= 16.0.0 (advise using [NVM tool](https://github.com/nvm-sh/nvm))
- NodeJS >= 18.0.0 (advise using [NVM tool](https://github.com/nvm-sh/nvm))
```shell
nvm install 16 && nvm use 16
nvm install 18 && nvm use 18
```
- Yarn
```shell
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"buffer": "^6.0.3",
"clipboard": "^2.0.8",
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"mobx": "^6.6.2",
"mobx-react-lite": "^3.4.0",
"murmurhash": "2.0.1",
Expand Down Expand Up @@ -94,7 +93,6 @@
"semver": "^7.6.0",
"showdown": "^1.9.1",
"styled-components": "^5.3.5",
"tailwind-merge": "^2.3.0",
"typescript": "^4.9.5"
},
"devDependencies": {
Expand All @@ -104,8 +102,7 @@
"@types/intercom-web": "^2.8.23",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.161",
"@types/luxon": "^3.4.2",
"@types/node": "^16.11.31",
"@types/node": "18",
"@types/qs": "^6.9.7",
"@types/react": "^18.2.55",
"@types/react-beautiful-dnd": "^13.1.2",
Expand Down
3 changes: 1 addition & 2 deletions src/Components/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { tw } from '../../commons/tailwind'

type Props = {
className?: string
Expand All @@ -15,7 +14,7 @@ export const Spinner = ({ className }: Props) => {
<div role="status">
<svg
aria-hidden="true"
className={tw('inline w-24 h-24 text-gray-200 animate-spin fill-primary', className)}
className="inline w-24 h-24 text-gray-200 animate-spin fill-primary"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/ClickBoarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const ClickBoarding = observer(() => {
>
<Row>
<h1>Please wait while we onboard your node</h1>
<Spinner className="size-12" />
<Spinner />
</Row>
{error && <Error>{error}</Error>}
</div>
Expand Down
7 changes: 0 additions & 7 deletions src/commons/tailwind.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import ReactDOM from 'react-dom/client'
import { Provider } from 'react-redux'
import { store } from './redux/store'
import AppRouter from './Pages/AppRouter'
import { Settings as LuxonSettings } from 'luxon'

import './index.css'

LuxonSettings.defaultZone = Intl.DateTimeFormat().resolvedOptions().timeZone
LuxonSettings.defaultLocale = Intl.Locale.name

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)

const app = (
Expand Down
3 changes: 1 addition & 2 deletions src/redux/complex.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { store } from './store'
import errors from '../commons/errors'
import { Config } from 'mysterium-vpn-js'
import termsPackageJson from '@mysteriumnetwork/terms/package.json'
import { DateTime } from 'luxon'
import termsJson from '@mysteriumnetwork/terms/package.json'

const { api } = tequila
Expand Down Expand Up @@ -177,7 +176,7 @@ const setFeatures = async (features: string[]): Promise<Config> => {
}

const recordTerms = async (): Promise<unknown> => {
const now = DateTime.utc().toISODate()
const now = new Date().toISOString().split('T')[0]
return api
.updateUserConfig({
data: {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"downlevelIteration": true
},
"include": [
"src"
Expand Down
20 changes: 6 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2491,11 +2491,6 @@
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3"
integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==

"@types/luxon@^3.4.2":
version "3.4.2"
resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.4.2.tgz#e4fc7214a420173cea47739c33cdf10874694db7"
integrity sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==

"@types/mime@^1":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690"
Expand All @@ -2515,10 +2510,12 @@
dependencies:
undici-types "~5.26.4"

"@types/node@^16.11.31":
version "16.18.94"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.94.tgz#3337174e6d031e5803eb0a6a34fdbaafc08b26c3"
integrity sha512-X8q3DoKq8t/QhA0Rk/9wJUajxtXRDiCK+cVaONKLxpsjPhu+xX6uZuEj4UKGLQ4p0obTdFxa0cP/BMvf9mOYZA==
"@types/node@18":
version "18.19.34"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.34.tgz#c3fae2bbbdb94b4a52fe2d229d0dccce02ef3d27"
integrity sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==
dependencies:
undici-types "~5.26.4"

"@types/parse-json@^4.0.0":
version "4.0.2"
Expand Down Expand Up @@ -7597,11 +7594,6 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"

luxon@^3.4.4:
version "3.4.4"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.4.tgz#cf20dc27dc532ba41a169c43fdcc0063601577af"
integrity sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==

lz-string@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
Expand Down

0 comments on commit 3fad7da

Please sign in to comment.