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
| // craco babel config ovveride for use @babel/plugin-proposal-optional-chaining | |
| // info: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining | |
| // craco: https://github.com/gsoft-inc/craco | |
| module.exports = { | |
| overrideCracoConfig: ({ cracoConfig }) => { | |
| cracoConfig.babel.plugins.push([ | |
| '@babel/plugin-proposal-optional-chaining', | |
| ]); |
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 { createAction } from 'redux-starter-kit'; | |
| export const apiStart = createAction('apiStart'); | |
| export const apiEnd = createAction('apiEnd'); | |
| export const accessDenied = createAction('accessDenied'); | |
| export const apiError = createAction('apiError'); |
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
| // useRequiredFields.js | |
| import { useState } from 'react' | |
| function useRequiredFields(requiredIds) { | |
| // have all the required fields been filled? | |
| const [requirementsFilled, setRequirementsFilled] = useState(false) | |
| // keep an array of the field ids that have been filled | |
| const [fieldsFilled, setFieldsFilled] = useState([]) |
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
| https://send.firefox.com/download/9c477dafe1a48746/#gIJdVIy-5JEl2TuJt22Urw | |
| https://send.firefox.com/download/83bf45802fe162da/#EZ88s1IwQgdsoVhJLK00cg |
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
| self.addEventListener('install', (e) => { | |
| e.waitUntil( | |
| caches.open("precache").then((cache) => cache.add("/broken.png")) | |
| ); | |
| }); | |
| function isImage(fetchRequest) { | |
| return fetchRequest.method === "GET" && fetchRequest.destination === "image"; | |
| } |