diff --git a/open-giving/src/components/DonationForm.js b/open-giving/src/components/DonationForm.js index c160b2b..14bbb2e 100644 --- a/open-giving/src/components/DonationForm.js +++ b/open-giving/src/components/DonationForm.js @@ -1,10 +1,11 @@ import React, { useEffect } from 'react'; import useDonation from '../hooks/useDonation'; -import DonateButton from './landingpage/donateButton'; -import CopyWithTooltip from './landingpage/copy'; import { sanitizeNumericInput } from '../utils/paymentMethods'; +import CopyWithTooltip from './landingpage/copy'; +import DonateButton from './landingpage/donateButton'; + const dev = process.env.NODE_ENV == 'development'; const DonationForm = React.memo( ({ method, index, setSnackbarMessage, setSnackbarOpen, NPOName }) => { diff --git a/open-giving/src/components/Header.js b/open-giving/src/components/Header.js index d865d7e..c0671a6 100644 --- a/open-giving/src/components/Header.js +++ b/open-giving/src/components/Header.js @@ -1,8 +1,9 @@ -import useIsMobileScreen from '@/hooks/mobile'; import Image from 'next/image'; import React from 'react'; import { FaGithub } from 'react-icons/fa'; +import useIsMobileScreen from '@/hooks/mobile'; + const Header = () => { const isMobile = useIsMobileScreen(); return ( diff --git a/open-giving/src/components/Layout.js b/open-giving/src/components/Layout.js index 9e5847f..a67929e 100644 --- a/open-giving/src/components/Layout.js +++ b/open-giving/src/components/Layout.js @@ -1,8 +1,9 @@ +import Image from 'next/image'; import React from 'react'; -import TestModeSwitcher from './TestModeSwitcher'; -import Header from './Header'; import { FaHeart } from 'react-icons/fa6'; -import Image from 'next/image'; + +import Header from './Header'; +import TestModeSwitcher from './TestModeSwitcher'; const Layout = ({ children, plain = false }) => { return (
diff --git a/open-giving/src/components/NonProfitDialog.js b/open-giving/src/components/NonProfitDialog.js index f22349d..3a2884a 100644 --- a/open-giving/src/components/NonProfitDialog.js +++ b/open-giving/src/components/NonProfitDialog.js @@ -1,15 +1,17 @@ +import Image from 'next/image'; import React, { useState } from 'react'; -import { MdClose, MdLocationOn } from 'react-icons/md'; import { FaRegCalendarAlt } from 'react-icons/fa'; -import DonationForm from './DonationForm'; -import Image from 'next/image'; import { FaAngleRight, FaArrowLeft } from 'react-icons/fa6'; +import { MdClose, MdLocationOn } from 'react-icons/md'; + +import DonationForm from './DonationForm'; + +import useIsMobileScreen from '@/hooks/mobile'; import { filterDonationMethods, formatPaymentMethodName, getIconByMethod, } from '@/utils/paymentMethods'; -import useIsMobileScreen from '@/hooks/mobile'; const Modal = ({ open, onClose, children }) => { if (!open) return null; @@ -39,6 +41,7 @@ const NonProfitDialog = ({ nonProfit?.logo || defaultLogo ); const [selectedPaymentType, setSelectedPaymentType] = useState(null); + const isMobile = useIsMobileScreen(); const handleDialogImageError = () => { setDialogImgSrc(defaultLogo); @@ -46,7 +49,6 @@ const NonProfitDialog = ({ if (!nonProfit) return null; - const isMobile = useIsMobileScreen(); const getPaymentID = (method) => { if (!method.paymentID) { return true; @@ -102,7 +104,10 @@ const NonProfitDialog = ({ }, ].map((i) => { return ( - + {i.icon} {i.name} ); @@ -186,6 +191,7 @@ const NonProfitDialog = ({ {options.map((i) => { return (