Skip to content

Commit

Permalink
fix: fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bayogluteoman committed May 4, 2022
1 parent 6df782e commit 48eb29f
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function AuthenticationModuleSpan() {
>
<AiFillLinkedin className="text-[#6A2C70] text-7xl hover:text-[#803886]" />
</a>
<a href="https://github.com/" target="_blank" rel="noopener noreferrer">
<a
href="https://github.com/ReCoded-Org/capstone-turkey-react-bursapediary"
target="_blank"
rel="noopener noreferrer"
>
<AiFillGithub className="text-[#6A2C70] text-7xl hover:text-[#803886]" />
</a>
</div>
Expand Down
9 changes: 7 additions & 2 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Footer() {
className="text-center lg:text-left bg-[#6A2C70]"
data-testid="valid-footer"
>
<div className="mx-6 pt-5 text-center md:text-left">
<div className="mx-12 pt-5 text-center md:text-left">
<div className="grid grid-1 md:grid-cols-3 lg:grid-cols-3 gap-12">
<div>
<h6
Expand Down Expand Up @@ -83,7 +83,12 @@ function Footer() {
<AiFillLinkedin className="text-[#ffffff] text-3xl hover:text-[#0E76A8]" />
</a>

<a href="http://bursapediary.com/" className="text-white p-2">
<a
href="https://github.com/ReCoded-Org/capstone-turkey-react-bursapediary"
target="_blank"
className="text-white p-2"
rel="noreferrer"
>
<AiFillGithub className="text-[#ffffff] text-3xl hover:text-[#171515]" />
</a>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { useSelector } from 'react-redux';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';

import mainHero from '../../assets/images/main-hero.svg';

function Information() {
const user = useSelector((state) => state.user.currentUser);
const { t } = useTranslation();
const navigate = useNavigate();

return (
<div className=" flex flex-col flex-auto w-full sm:w-32 gap-5 justify-center lg:px-20 md:px-10 sm:px-8">
Expand All @@ -19,6 +21,7 @@ function Information() {
<button
className="w-40 bg-primary hover:bg-primaryHover items-center text-white text-xs lg:text-sm md:text-sm sm:text-xs py-2 px-4 font-semibold rounded focus:outline-none focus:shadow-outline self-center sm:self-auto"
type="submit"
onClick={() => navigate('/signup')}
>
{t('homepage.actionButtonText')}
</button>
Expand Down
22 changes: 12 additions & 10 deletions src/components/Navbar/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,18 @@ function Navbar() {
{t('navbar.home')}
</Link>
</li>
<li className="nav-item">
<Link
to={PROJECT_ROUTE}
className="nav-link block pr-2 lgnav:px-2 py-2 text-primary font-semibold hover:text-primaryHover transition duration-150 ease-in-out smnav:text-center xsnav:text-center smnav:bg-secondary xsnav:bg-secondary"
data-mdb-ripple="true"
data-mdb-ripple-color="light"
>
{t('navbar.projects')}
</Link>
</li>
{user ? (
<li className="nav-item">
<Link
to={PROJECT_ROUTE}
className="nav-link block pr-2 lgnav:px-2 py-2 text-primary font-semibold hover:text-primaryHover transition duration-150 ease-in-out smnav:text-center xsnav:text-center smnav:bg-secondary xsnav:bg-secondary"
data-mdb-ripple="true"
data-mdb-ripple-color="light"
>
{t('navbar.projects')}
</Link>
</li>
) : null}
<li className="nav-item">
<Link
to={FAQ_ROUTE}
Expand Down
6 changes: 3 additions & 3 deletions src/components/SignUpForm/SignUpForm.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Formik, ErrorMessage } from 'formik';
import * as Yup from 'yup';
import { useNavigate } from 'react-router-dom';
import { useNavigate, Link } from 'react-router-dom';
import { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -145,12 +145,12 @@ function SignUpForm() {
</button>
</div>
<div className="mb-8 text-center pt-2">
<a className="text-sm" href="/login">
<Link className="text-sm" to="/signin">
{t('authForms.alreadyHave')}
<p className="text-[#0038FF] font-bold inline-block pl-1">
{t('auth.signin')}
</p>
</a>
</Link>
</div>
</form>
);
Expand Down
6 changes: 1 addition & 5 deletions src/features/projects/Projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ function Projects() {
? projectDetails !== null &&
projectDetails.map((e) => {
return (
<Link
key={e._id}
to={`/project/${e._id}`}
// onKeyDown={handleClick}
>
<Link key={e._id} to={`/project/${e._id}`}>
<ProjectCard
title={e.title}
image={image}
Expand Down
26 changes: 11 additions & 15 deletions src/features/projects/SelectedProject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function SelectedProject() {
<div className="flex flex-row mt-2">
<AiFillHeart className="w-4 h-4 mr-2 mt-1" />
<h1 className="mb-2">
Project Owner Name is organizing this fundraiser
Frontend Team is organizing this fundraiser
</h1>
</div>

Expand All @@ -62,13 +62,13 @@ export default function SelectedProject() {
.slice(0, 16)}
</h1>
<h1 className="mb-4">{selectedProjectDetails?.description}</h1>
<hr className="w-3/4 mb-2" />
<h1>
{/* <hr className="w-3/4 mb-2" /> */}
{/* <h1>
This fundraiser is related to{' '}
{selectedProjectDetails?.categories?.map((e) => {
return <li key={e}>{e}</li>;
})}
</h1>
</h1> */}
<div className="flex flex-row mt-2">
<AiFillHeart className="w-4 h-4 mr-2 mt-1" />
<h1 className="mb-2">Organizer</h1>
Expand All @@ -77,7 +77,7 @@ export default function SelectedProject() {
<div className="flex flex-row">
<AiOutlineUser className="w-8 h-8 mr-3" />
<div>
<h1 className="mb-2">Project Owner Name</h1>
<h1 className="mb-2">Frontend Team</h1>
<button
type="button"
className="inline-block px-6 py-2.5 bg-primary hover:bg-white text-white hover:text-black border-2 border-primary hover:border-black font-medium text-xs leading-tight uppercase rounded shadow-md focus:shadow-lg focus:outline-none focus:ring-0 active:shadow-lg transition duration-150 ease-in-out"
Expand Down Expand Up @@ -112,8 +112,8 @@ export default function SelectedProject() {
</div>
<div className="p-5">
<h1 className="font-bold text-2xl">
${selectedProjectDetails.collectedAmount} raised of $
{selectedProjectDetails.amount} goal
{/* ${selectedProjectDetails.collectedAmount} raised of $ */}
$350 raised of ${selectedProjectDetails.amount} goal
</h1>
<h1 className="text-gray mt-2">12 people donated to this project</h1>
<div className="flex flex-row mt-2">
Expand Down Expand Up @@ -146,9 +146,9 @@ export default function SelectedProject() {
<div className="flex flex-row mt-2">
<AiOutlineUser className="w-8 h-8 mr-3 mt-3" />
<div>
<h1 className="mb-2">Marry Poppins</h1>
<h1 className="mb-2">James Black</h1>
<div className="flex flex-row">
<h1 className="font-bold mr-2">$100</h1>
<h1 className="font-bold mr-2">$200</h1>
<AiOutlineRise className="w-5 h-5 mr-1" />
<h1>Top Donation</h1>
</div>
Expand All @@ -158,9 +158,9 @@ export default function SelectedProject() {
<div className="flex flex-row mt-2">
<AiOutlineUser className="w-8 h-8 mr-3 mt-3" />
<div>
<h1 className="mb-2">Marry Poppins</h1>
<h1 className="mb-2">Caroline Earl</h1>
<div className="flex flex-row">
<h1 className="font-bold mr-2">$100</h1>
<h1 className="font-bold mr-2">$50</h1>
<AiFillPushpin className="w-5 h-5 mr-1" />
<h1>First Donation</h1>
</div>
Expand All @@ -186,7 +186,3 @@ export default function SelectedProject() {
)
);
}

// SelectedProject.propTypes = {
// selectedProjectId: PropTypes.string.isRequired,
// };
4 changes: 2 additions & 2 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ i18n
a1: 'Yes. Bursapediary has enabled fundraising support for charities and individuals since 2021. Please feel free to contact any of our partner charities or individuals for their experience of our service. Bursapediary provides an extra layer of security and trust by managing all donations on the Bursapediary platform.',
q2: 'Can I make anonymous donations?',
a2: 'On a charity or fundraise project donation page, donors can now opt to give anonymously without their details being visible to the charity or fundraiser (they’ll still be required to provide their details to Bursapediary), or they may choose to provide the charity with their details as before. If the donor has selected the anonymous option, the donation notifications and donor reports will display the donation as “Anonymous”.',
q3: 'Bursapediary hayır kurumlarına veya bireylere herhangi bir fon sağlıyor mu?',
q3: 'Does Bursapediary provide any funds to charities or individuals?',
a3: 'No. The Bursapediary Foundation does not offer any form of financial support, loans or grants to charities or individuals. Bursapediary provides a secure, online donation processing and fundraising service globally to charities and fundraisers who wish to fundraise for these charities.',
},
register: {
Expand Down Expand Up @@ -251,7 +251,7 @@ i18n
accordions: {
general: {
title: 'Genel',
q1: 'Bursapediary güvebilir mi?',
q1: 'Bursapediary güvenilir mi?',
a1: "Evet. Bursapediary, 2021'den beri hayır kurumları ve bireyler için bağış toplama desteği sağlamıştır. Hizmetimizle ilgili deneyimleri için lütfen ortak hayır kurumları veya bireylerden herhangi biriyle iletişime geçmekten çekinmeyin. Bursapediary, tüm bağışları Bursapediary platformunda yöneterek ekstra bir güvenlik ve güven katmanı sağlar.",
q2: 'Anonim olarak bağış yapabilir miyim?',
a2: "Bir hayır kurumu veya bağış toplama projesi bağış sayfasında, bağışçılar artık ayrıntıları hayır kurumu veya bağış toplayıcı tarafından görülmeden anonim olarak bağışta bulunmayı seçebilir (ayrıntılarını yine de Bursapediary'ye vermeleri gerekecektir) veya hayır kurumuna şu bilgileri sunmayı seçebilirler: onların detayları daha önce olduğu gibi. Bağışçı anonim seçeneğini seçtiyse, bağış bildirimleri ve bağış raporları, bağışı “Anonim” olarak gösterecektir.",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SignInPage/SignInPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function SignIn() {
const { t } = useTranslation();

return (
<div className="flex sm:grid h-100 mb-16">
<div className="flex sm:grid h-100">
<div className="flex justify-center w-full sm:grid grid-cols-7 gap-2">
<AuthenticationModuleSpan />
<div className="col-span-3">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SignUpPage/SignUpPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AuthenticationModuleSpan from '../../components/AuthenticationModuleSpan/
function SignIn() {
const { t } = useTranslation();
return (
<div className="flex sm:grid h-100 mb-16">
<div className="flex sm:grid h-100">
<div className="flex justify-center w-full sm:grid grid-cols-7 gap-2">
<AuthenticationModuleSpan />
<div className="col-span-3">
Expand Down

0 comments on commit 48eb29f

Please sign in to comment.