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 React from 'react' | |
| import useFirebaseMessaging from '@hooks/useFirebase' | |
| const HowToUse = () => { | |
| useFirebaseMessaging() | |
| return <p>Firebase Messaging executed</p> | |
| } |
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 React, { useEffect, useState } from 'react' | |
| import useHasInstalledPWA from '@hooks/useHasInstalledPWA' | |
| import Button from '@atoms/Button' | |
| import Flex from '@atoms/Flex' | |
| import Paragraph from '@atoms/Paragraph' | |
| const PWAButton = () => { | |
| const [supportsPWA, setSupportsPWA] = useState(false) | |
| const [promptInstall, setPromptInstall] = useState(null) | |
| const hasInstalledPWA = useHasInstalledPWA() |
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 sharp from 'sharp' | |
| interface ProcessorData { | |
| directory: string | |
| content: Buffer | |
| } | |
| type ProcessorAction = (fileBuffer: Buffer) => Promise<Buffer> | |
| const processImage = (originalFile: Buffer) => { |
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
| /* Form need to be wrapped in FormikProvider to access formik context */ | |
| import React from 'react' | |
| import PropTypes from 'prop-types' | |
| import { useFormikContext } from 'formik' | |
| import TextField from '@atoms/TextField' | |
| const PhoneInput = ({ ...props }) => { | |
| const { setFieldValue } = useFormikContext() | |
| const { name, value } = props |
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 useRoute from './useRoute' | |
| const useGetParams = () => { | |
| const { location } = useRouter() | |
| return new URLSearchParams(location.search) | |
| } | |
| export default useGetParams |
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 React from 'react' | |
| import PropTypes from 'prop-types' | |
| import { graphql } from 'react-apollo' | |
| import { | |
| Button, | |
| Caption, | |
| Image, | |
| Loader, | |
| Paginate, | |
| Paragraph, |