Skip to content

Commit

Permalink
Merge pull request #16 from Chimoney/dev
Browse files Browse the repository at this point in the history
fix/ui cleanup and refactor file
  • Loading branch information
uchibeke authored Sep 23, 2024
2 parents ff9f712 + e2b1a63 commit e01c111
Show file tree
Hide file tree
Showing 43 changed files with 160 additions and 211 deletions.
3 changes: 0 additions & 3 deletions donation-ui/.eslintrc.json

This file was deleted.

76 changes: 0 additions & 76 deletions donation-ui/src/components/DownloadContactButton.js

This file was deleted.

62 changes: 0 additions & 62 deletions donation-ui/src/components/Layout.js

This file was deleted.

8 changes: 8 additions & 0 deletions open-giving/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "next/core-web-vitals",
"rules": {
"no-unused-vars": "off",
"functional/immutable-data": "off",
"functional/no-class": "off"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions donation-ui/package.json → open-giving/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "chimoney-upa-page",
"name": "chimoney-open-giving",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix"
"lint:fix": "eslint . --ext .js --fix"
},
"dependencies": {
"@emotion/cache": "^11.11.0",
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Chimoney UPA",
"name": "Chimoney Open Giving",
"short_name": "Chimoney App",
"description": "Chimoney Universal Payment Application",
"description": "Donate to Verified Non-Profits",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
Expand Down
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ContactForm = () => {
body: JSON.stringify({
email,
message,
notificationContext: "UPA Contact Form"
notificationContext: "Contact Form"
})
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import React, { useState } from 'react';
import CardGiftcardIcon from '@mui/icons-material/CardGiftcard';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import LinkIcon from '@mui/icons-material/Link';
import PaymentIcon from '@mui/icons-material/Payment';
import {
ListItem,
ListItemText,
IconButton,
Typography,
Link,
Accordion,
AccordionSummary,
AccordionDetails,
AccordionSummary,
Box,
TextField,
Button,
CircularProgress,
Link,
ListItem,
ListItemText,
TextField,
Typography,
} from '@mui/material';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import CardGiftcardIcon from '@mui/icons-material/CardGiftcard';
import PaymentIcon from '@mui/icons-material/Payment';
import LinkIcon from '@mui/icons-material/Link';
import { formatPaymentMethodName } from '../utils/paymentMethods';
import React from 'react';

import useDonation from '../hooks/useDonation';
import { formatPaymentMethodName } from '../utils/paymentMethods';

const DonationForm = ({
method,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import FilterListIcon from '@mui/icons-material/FilterList';
import {
Accordion,
AccordionSummary,
AccordionDetails,
Typography,
AccordionSummary,
Box,
Button,
Typography,
} from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import FilterListIcon from '@mui/icons-material/FilterList';
import React from 'react';

const FilterAccordion = ({
isExpanded,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react';

const dev = process.env.NODE_ENV == 'development';

const UPA = () => {
const Footer = () => {
const theme = useTheme();
return (
<div style={{ textAlign: 'center', paddingBottom: '60px' }}>
Expand Down Expand Up @@ -50,4 +50,4 @@ const UPA = () => {
);
};

export default UPA;
export default Footer;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Typography } from '@mui/material';
import React from 'react';

const Header = () => (
<>
Expand Down
66 changes: 66 additions & 0 deletions open-giving/src/components/Layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import GitHubIcon from '@mui/icons-material/GitHub';
import LockIcon from '@mui/icons-material/Lock';
import { Box, Button, Container, IconButton } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import React from 'react';

const Layout = ({ children, plain = false }) => {
const theme = useTheme();

return (
<Box sx={{ minHeight: '100vh', backgroundColor: 'background.default' }}>
{!plain && (
<Box
sx={{
position: 'fixed',
top: 16,
right: 16,
zIndex: 1000,
}}
>
<IconButton
color="primary"
aria-label="github repository"
component="a"
href="https://github.com/Chimoney/non-profit-donations"
target="_blank"
rel="noopener noreferrer"
>
<GitHubIcon />
</IconButton>
</Box>
)}
{children}
{!plain && (
<Container
style={{
textAlign: 'center',
marginTop: '50px',
}}
maxWidth="xl"
>
<Button
variant="text"
disabled
startIcon={<LockIcon sx={{ width: '0.5em' }} color="success" />}
style={{
color: theme.palette.common.black,
margin: 'auto',
position: 'fixed',
left: 0,
bottom: 0,
width: '100%',
background: theme.palette.background.paper,
zIndex: '1000000',
}}
fullWidth
>
Built with ❤️ by Chimoney
</Button>
</Container>
)}
</Box>
);
};

export default Layout;
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Typography,
} from '@mui/material';
import React from 'react';

import QRCodeComponent from './QRCodeComponent';

export default function NonProfitCard({ nonProfit, onLearnMore, showQRCode }) {
Expand Down Expand Up @@ -85,7 +86,14 @@ export default function NonProfitCard({ nonProfit, onLearnMore, showQRCode }) {
/>
</Box>
) : (
<Box sx={{ display: 'flex', justifyContent: 'center', mb: '20px' }}>
<Box
sx={{
display: 'flex',
justifyContent: 'right',
mb: '20px',
mr: '30px',
}}
>
{hasValidPaymentMethods && (
<Button
size="small"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import React, { useState } from 'react';
import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
import EmailIcon from '@mui/icons-material/Email';
import LanguageIcon from '@mui/icons-material/Language';
import LocationOnIcon from '@mui/icons-material/LocationOn';
import {
Box,
Button,
Chip,
Dialog,
DialogTitle,
DialogContent,
DialogActions,
Button,
Typography,
DialogContent,
DialogTitle,
Divider,
Grid,
Box,
Chip,
Link,
Divider,
List,
Typography,
} from '@mui/material';
import LocationOnIcon from '@mui/icons-material/LocationOn';
import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
import LanguageIcon from '@mui/icons-material/Language';
import EmailIcon from '@mui/icons-material/Email';
import React, { useState } from 'react';

import DonationForm from './DonationForm';

const NonProfitDialog = ({
Expand Down
Loading

0 comments on commit e01c111

Please sign in to comment.