Skip to content

Commit

Permalink
Add new logo and mission edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Sulton88Mehron90 committed Nov 19, 2023
1 parent df78623 commit cc0834f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 19 deletions.
38 changes: 22 additions & 16 deletions src/Components/CareRequestForm/CareRequestForm.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import '../CareRequestForm/CareRequestForm.scss';
import '../CareRequestForm/CareRequestForm.scss';
import { useMutation } from '@apollo/client';
import { CREATE_AID_REQUEST } from '../../apollo-client/mutations';

function CareRequestForm() {
const navigate = useNavigate();
const [formData, setFormData] = useState({
aidType: '',
description: '',
// more fields ?
});
function CareRequestForm({ organizationId }) {
const navigate = useNavigate();
const [formData, setFormData] = useState({
aidType: '',
description: '',
});

const [createAidRequest, { loading, error }] = useMutation(CREATE_AID_REQUEST);

const handleChange = (e) => {
const { name, value } = e.target;
Expand All @@ -19,14 +22,17 @@ function CareRequestForm() {
};

const handleSubmit = (e) => {
e.preventDefault();
// Here we should add the logic to send data to the server
// For now, we'll just log the formData and navigate to a different page
console.log(formData);

// After submitting, navigate to a different page, mayby the dashboard or a success page?
navigate('/success');
};
e.preventDefault();
createAidRequest({ variables: { ...formData, organizationId } })
.then(() => {
navigate('/organization-dashboard');
})
.catch((err) => {
console.error('Error creating aid request:', err);
alert('Failed to create aid request. Please try again.');
});
};


return (
<div className="care-request-form-container">
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Homepage/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ function Homepage() {
<div className="title-container">
<h2>Our Mission</h2>
</div>
<p>Our mission at Refuge is to ensure that refugees, asylum seekers, and migrants, wherever they may be, have access to trusted services and accurate information right at their fingertips.</p>
<p>Our mission at Refugee Aid is to ensure that refugees, asylum seekers, and migrants, wherever they may be, have access to trusted services and accurate information right at their fingertips.</p>
<p>Article 14 of the UN Declaration of Human Rights promises that all individuals have "the right to seek and enjoy asylum from persecution in other countries."</p>
<p>At Refuge, we are dedicated to helping people realize and exercise this right, no matter where they are in their journey.</p>
<p>At Refugee Aid, we are dedicated to helping people realize and exercise this right, no matter where they are in their journey.</p>
<p>We do everything within our power and capabilities to transform the fear in the hearts of those in need into hope.</p>
{!showVideo && (
<div className="video-controls">
Expand Down
2 changes: 1 addition & 1 deletion src/Components/NavBar/NavBar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { NavLink } from 'react-router-dom';
import logoImage from '../../images/refuge.png';
import logoImage from '../../images/refugee-aid.PNG';
import './NavBar.scss';
import PropTypes from 'prop-types';

Expand Down
1 change: 1 addition & 0 deletions src/Components/NavBar/NavBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ body {
transition: transform 0.3s ease;
position: relative;
top: -7px;
border-radius: 50%;

&:hover {
transform: scale(1.3);
Expand Down
14 changes: 14 additions & 0 deletions src/apollo-client/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@ export const UPDATE_AID_REQUEST = gql`
}
}
`;

export const CREATE_AID_REQUEST = gql`
mutation createAidRequest($aidType: String!, $description: String!, $organizationId: ID!) {
createAidRequest(aidType: $aidType, description: $description, organizationId: $organizationId) {
id
aidType
description
organization {
id
name
}
}
}
`;
Binary file added src/images/refugee-aid.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cc0834f

Please sign in to comment.