Skip to content

Commit

Permalink
Merge pull request #45 from Bostonhacks/resume-upload
Browse files Browse the repository at this point in the history
Resume upload
  • Loading branch information
danielyu12 authored Sep 25, 2023
2 parents 8f501f3 + 397e0a2 commit 39e95bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/components/SponsorPageComponents/SponsorButton.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useNavigate, useLocation } from 'react-router-dom';
import InitialButtonState from '../../assets/images/SponsorPage/SponsorButtonState1.svg';
import HoverButtonState from '../../assets/images/SponsorPage/SponsorButtonState2.svg';
import ClickedButtonState from '../../assets/images/SponsorPage/SponsorButtonState3.svg';

const SponsorButton = () => {
const [image, setImage] = useState(InitialButtonState);
const navigate = useNavigate();
const location = useLocation();

const handleClick = () => {
navigate('/sponsor');
if (location.pathname === '/sponsor') {
window.location.href =
'https://drive.google.com/file/d/1QXGi1T9DDUsQ0gbiHKvN5lo3pR0fJw2f/view?usp=sharing';
} else {
navigate('/sponsor');
}
};

return (
Expand Down
6 changes: 5 additions & 1 deletion src/pages/Application.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react';
import { useMediaQuery } from 'react-responsive';

import { useNavigate } from 'react-router-dom';

Expand Down Expand Up @@ -104,6 +105,7 @@ const Application = ({ applicationId }) => {
const [resume, setResume] = useState(null);
const navigate = useNavigate();
const { register, handleSubmit, control } = useForm();
const smallScreen = useMediaQuery({ maxWidth: 850 });

// Function runs on application form submission.
const onSubmit = async (data) => {
Expand Down Expand Up @@ -216,7 +218,9 @@ const Application = ({ applicationId }) => {
};
}, []);

return (
return smallScreen ? (
<div>Mobile site coming soon, please apply on desktop for now!</div>
) : (
<div
style={{
background:
Expand Down

0 comments on commit 39e95bf

Please sign in to comment.