This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createContext, ReactNode, useEffect, useState } from 'react' | |
| type Theme = 'light' | 'dark'; | |
| type ThemeContextProviderProps = { | |
| children: ReactNode; | |
| } | |
| type ThemeContextType = { | |
| theme: Theme; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| env: { | |
| browser: true, | |
| es2021: true, | |
| node: true | |
| }, | |
| extends: ['plugin:react/recommended', 'plugin:prettier/recommended', 'standard'], | |
| parser: '@typescript-eslint/parser', | |
| parserOptions: { | |
| ecmaFeatures: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { PromiseQueueItem, PromiseItem } from './PromiseQueueItem' | |
| export class PromiseQueue { | |
| public isActive = true | |
| public isRunning = false | |
| private promises: PromiseQueueItem[] = [] | |
| public get promisesRunning() { | |
| return this.promises.filter((promiseItem) => promiseItem.isRunning) | |
| } |