Skip to content

Commit

Permalink
Merge pull request #33 from JJtan2002/TnC
Browse files Browse the repository at this point in the history
Added terms and conditions to Register page
  • Loading branch information
JJtan2002 authored Jul 6, 2024
2 parents 5c3dfe6 + 4afa94f commit fcb4b30
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 35 deletions.
13 changes: 13 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"react-router-dom": "^6.23.1",
"react-scripts": "5.0.1",
"react-toastify": "^10.0.5",
"reactjs-popup": "^2.0.6",
"tailwindcss": "^3.4.3",
"web-vitals": "^2.1.4"
},
Expand Down
64 changes: 54 additions & 10 deletions frontend/src/pages/Register.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { useNavigate } from "react-router-dom";
import { useEffect } from "react";
import { useAuth } from "../contexts/AuthContext";
import { toast } from "react-toastify";
import axios from "axios";

import React, { useState } from 'react';
import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css';

const Register = () => {
const { Register, isLoggedIn } = useAuth();


let navigate = useNavigate();

Expand Down Expand Up @@ -122,12 +121,57 @@ const Register = () => {
className="font-light text-gray-500 dark:text-gray-300"
>
I accept the{" "}
<a
className="font-medium text-purple-600 hover:underline dark:text-purple-500"
href="#"
>
Terms and Conditions
</a>

<Popup trigger={<button type="button" className="font-medium text-purple-600 hover:underline dark:text-purple-500">Terms and Conditions</button>} modal>
{close => (
<div className="modal bg-white rounded-lg shadow-lg p-6 max-w-3xl w-full">
<button className="close" onClick={close}>&times;</button>
<div className="header text-2xl font-semibold mb-4">Terms and Conditions</div>
<div className="content overflow-y-scroll h-96">
<p className="mb-4">
Welcome to CashFlow! These terms and conditions outline the rules and regulations for the use of our website and services.
</p>
<h3 className="text-xl font-semibold mb-2">1. Introduction</h3>
<p className="mb-4">
By accessing this website we assume you accept these terms and conditions. Do not continue to use CashFlow if you do not agree to take all of the terms and conditions stated on this page.
</p>
<h3 className="text-xl font-semibold mb-2">2. Cookies</h3>
<p className="mb-4">
We employ the use of cookies. By accessing CashFlow, you agreed to use cookies in agreement with the CashFlow's Privacy Policy.
</p>
<h3 className="text-xl font-semibold mb-2">3. License</h3>
<p className="mb-4">
Unless otherwise stated, CashFlow and/or its licensors own the intellectual property rights for all material on CashFlow. All intellectual property rights are reserved. You may access this from CashFlow for your own personal use subjected to restrictions set in these terms and conditions.
</p>
<h3 className="text-xl font-semibold mb-2">4. User Comments</h3>
<p className="mb-4">
Parts of this website offer an opportunity for users to post and exchange opinions and information in certain areas of the website. CashFlow does not filter, edit, publish or review Comments prior to their presence on the website.
</p>
<h3 className="text-xl font-semibold mb-2">5. Content Liability</h3>
<p className="mb-4">
We shall not be held responsible for any content that appears on your Website. You agree to protect and defend us against all claims that are rising on your Website.
</p>
<h3 className="text-xl font-semibold mb-2">6. Your Privacy</h3>
<p className="mb-4">
We may collect certain personally identifiable information if you choose to provide it. This could include, but is not limited to, your name and email address (depending on your project's functionality). We may use your PII to respond to your inquiries and requests, send you information about our Service, and for internal
administrative purposes. We take reasonable steps to protect your information from unauthorized access, disclosure, alteration, or destruction. However, no internet transmission or electronic storage method is completely secure.
You may have the ability to access and update your PII through your account settings. You may also access the site's features by our test account.
</p>
<h3 className="text-xl font-semibold mb-2">7. Reservation of Rights</h3>
<p className="mb-4">
We reserve the right to request that you remove all links or any particular link to our Website. You approve to immediately remove all links to our Website upon request.
</p>
<h3 className="text-xl font-semibold mb-2">8. Removal of links from our website</h3>
<p className="mb-4">
If you find any link on our Website that is offensive for any reason, you are free to contact and inform us any moment. We will consider requests to remove links but we are not obligated to or so or to respond to you directly.
</p>
<p className="mt-6">
By using our website, you hereby consent to our Terms and Conditions and agree to its terms.
</p>
</div>
</div>
)}
</Popup>
</label>
</div>
</div>
Expand Down
26 changes: 1 addition & 25 deletions frontend/src/pages/Wallet.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
import { useEffect, useState } from "react";
import { redirect, useNavigate } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { useAuth } from "../contexts/AuthContext";
import { useTransactions } from "../hooks/useTransactions";
import { useWallet } from "../hooks/useWallet";
import { useLabels } from "../hooks/useLabels";
import { useQuery } from "@tanstack/react-query";
import dayjs from "dayjs";
import { toast } from "react-toastify";
import { IconButton } from "@mui/material";
import DeleteIcon from "@mui/icons-material/Delete"
import 'chart.js/auto';
import { LinearProgress } from '@mui/material';

const Wallet = () => {
// Placeholder data

const labelsData = [
{ id: 1, name: 'Groceries' },
{ id: 2, name: 'Rent' },
{ id: 3, name: 'Utilities' },
{ id: 4, name: 'Entertainment' },
{ id: 5, name: 'Savings' },
{ id: 6, name: 'Transportation' },
];

const goalsData = [
{ labelId: 1, goal: 300 }, // Groceries
{ labelId: 2, goal: 1000 }, // Rent
{ labelId: 3, goal: 150 }, // Utilities
{ labelId: 4, goal: 200 }, // Entertainment
{ labelId: 5, goal: 500 }, // Savings
{ labelId: 6, goal: 100 }, // Transportation
];

const [goals, setGoals] = useState(goalsData);

// hooks
const { isLoggedIn, user } = useAuth();
const { getTransactions, createTransaction, deleteTransaction } = useTransactions();
const { getWallet, updateWallet } = useWallet();
const { getLabels, createLabel, deleteLabel, editLabel } = useLabels();
const [expenseCategories, setExpenseCategories] = useState([]);
Expand Down

0 comments on commit fcb4b30

Please sign in to comment.