Skip to content

Commit

Permalink
linting + donations background
Browse files Browse the repository at this point in the history
  • Loading branch information
jennymar committed Jun 30, 2024
1 parent fb155c9 commit aeb2a43
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 24 deletions.
Binary file added frontend/public/donations/donationsbackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions frontend/src/app/(web app)/donations/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import DonateApp from "../../../components/payment/DonateApp";

export default function App() {
export default function Donations() {
return (
<div
className="w-full h-[100vh] flex justify-center items-center"
className="w-full h-[220vh] flex justify-center items-start"
style={{
backgroundImage:
"url(https://firebasestorage.googleapis.com/v0/b/flot-dev.appspot.com/o/static-uploads%2Fimage.png?alt=media&token=44407612-8c8e-492a-988a-2c211d2926bb)",
backgroundImage: "url(/donations/donationsbackground.png)",
backgroundPosition: "center",
backgroundSize: "cover",
backgroundRepeat: "no-repeat",
paddingTop: "80px",
}}
>
<DonateApp />
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/admin/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"use client";

import { useEffect, useState } from "react";

import styles from "./page.module.css";

import DashboardCard from "@/components/DashboardCard";
import { getRecord } from "@/api/records";
import DashboardCard from "@/components/DashboardCard";

export default function Dashboard() {
const [lastUpdated, setLastUpdated] = useState<Record<string, string>>({});
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/ContactForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ const ContactForm: React.FC = () => {
subject,
message,
question: questionType,
}).then((error) => {
// If the .then() request fails, show the error message
}).catch((error) => {
alert(error);
});
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/EventSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { TextAreaCharLimit } from "./TextAreaCharLimit";
import { TextFieldCharLimit } from "./TextFieldCharLimit";
import SimpleImageDropzone from "./admin/storage/SimpleImageDropzone";

import { updateRecord } from "@/api/records";
import { deleteFile } from "@/app/admin/util/pageeditUtil";
import AlertBanner from "@/components/AlertBanner";
import { TextField } from "@/components/TextField";
import { WarningModule } from "@/components/WarningModule";
import { updateRecord } from "@/api/records";

const EVENT_TITLE_CHAR_LIMIT = 35;
const EVENT_DESCRIPTION_SHORT_CHAR_LIMIT = 200;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, { useState } from "react";
import { createSubscriber } from "../api/subscriber";

import styles from "./Footer.module.css";

import { updateRecord } from "@/api/records";

const Footer = () => {
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/components/NewsletterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { sendEmail } from "../api/email";
import { createSubscriber } from "../api/subscriber";

import styles from "./NewsletterForm.module.css";

import { updateRecord } from "@/api/records";

type NewsLetterFormProps = {
Expand Down Expand Up @@ -82,12 +83,9 @@ const NewsletterForm: React.FC<NewsLetterFormProps> = ({
email,
quarterlyUpdates,
specialUpdates,
}).then(
() => {},
(error) => {
alert(error);
},
);
}).catch((error) => {
alert(error);
});

updateRecord("mailing-list").catch(console.error);
setSuccess(true);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/NewsletterSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { TextFieldCharLimit } from "./TextFieldCharLimit";
import { WarningModule } from "./WarningModule";
import SimpleImageDropzone from "./admin/storage/SimpleImageDropzone";

import { deleteFile } from "@/app/admin/util/pageeditUtil";
import { updateRecord } from "@/api/records";
import { deleteFile } from "@/app/admin/util/pageeditUtil";

const NEWSLETTER_TITLE_CHAR_LIMIT = 35;
const NEWSLETTER_DESCRIPTION_CHAR_LIMIT = 200;
Expand Down
9 changes: 3 additions & 6 deletions frontend/src/components/VolunteerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,9 @@ const VolunteerForm: React.FC<VolunteerFormProps> = ({
email,
phoneNumber,
receiveNews,
}).then(
() => {},
(error) => {
alert(error);
},
);
}).catch((error) => {
alert(error);
});
} else {
alert(response.error);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/admin/storage/GalleryDropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function IconAndText({ capped, uploading, disabled }: IconTextProps) {

export default function GalleryDropzone({ field }: GalleryDropProps) {
const storage = getStorage();
const [uploadFile, uploading, snapshot, error] = useUploadFile();
const [uploadFile, uploading, error] = useUploadFile();
const accept = {
"image/*": [".jpeg", ".jpg", ".png"],
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/admin/storage/ImageDropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type ImageDropProps = {

export default function ImageDropzone({ field }: ImageDropProps) {
const storage = getStorage();
const [uploadFile, uploading, snapshot, error] = useUploadFile();
const [uploadFile, uploading, error] = useUploadFile();
const accept = {
"image/*": [".jpeg", ".jpg", ".png"],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function SimpleImageDropzone({
onUpload,
}: ImageDropProps) {
const storage = getStorage();
const [uploadFile, uploading, snapshot, error] = useUploadFile();
const [uploadFile, uploading, error] = useUploadFile();
const accept = {
"image/*": [".jpeg", ".jpg", ".png"],
};
Expand Down

0 comments on commit aeb2a43

Please sign in to comment.