Skip to content

Commit

Permalink
Merge pull request #59 from SilverCareOrg/stefan
Browse files Browse the repository at this point in the history
Stefan
  • Loading branch information
avramstefan authored Nov 3, 2023
2 parents cb780b3 + 66e8f23 commit 5804f5c
Show file tree
Hide file tree
Showing 37 changed files with 2,782 additions and 1,804 deletions.
1,268 changes: 679 additions & 589 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"env-cmd": "^10.1.0",
"file-saver": "^2.0.5",
"fs": "^0.0.1-security",
"leaflet": "^1.9.4",
"lottie-react": "^2.4.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-leaflet": "^4.2.1",
"react-lottie": "^1.2.3",
"react-router-dom": "^6.14.1",
"react-scripts": "^5.0.1",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 12 additions & 11 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import { Routes, Route } from "react-router-dom";
import Home from "./pages/Home";
import About from "./pages/About";
import Contact from "./pages/Contact";
Expand All @@ -11,42 +12,43 @@ import Cart from "./pages/Cart";
import Signup from "./pages/Signup";
import Navbar from "./components/Navbar";
import Footer from "./components/Footer";
import { Route, Routes } from "react-router-dom";
import ProductDetails from "./components/ProductDetails";
import CartPanel from "./components/CartPanel";
import RegistrationService from "./components/RegistrationService";
import PaymentSuccess from "./pages/PaymentSuccess"
import PaymentFail from "./pages/PaymentFail"
import PaymentSuccess from "./pages/PaymentSuccess";
import PaymentFail from "./pages/PaymentFail";
import Categories from "./pages/Categories";
import { BsArrowLeft, BsArrowRight } from "react-icons/bs";
import { useNavigate } from 'react-router-dom';
import CheckoutDetails from "./components/CheckoutDetails";
import {Elements} from '@stripe/react-stripe-js';
import {loadStripe} from "@stripe/stripe-js/pure";
import { Elements } from "@stripe/react-stripe-js";
import { loadStripe } from "@stripe/stripe-js/pure";
import ScrollOnTopOnRefresh from "./components/ScrollOnTopOnRefresh";

const stripePromise = loadStripe(process.env.REACT_APP_STRIPE_KEY);

const App = () => {
return (
<section className="flex flex-col min-h-screen overflow-x-hidden overflow-hidden">
<Navbar />

<main className="flex-grow">
<ScrollOnTopOnRefresh />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/product/:category" element={<Product />} />
<Route path="/product/search/:search_input" element={<Product />} />
<Route path="/product" element={<Product />} />
<Route path="product/:id" element={<ProductDetails />} />
<Route path="/product/:id" element={<ProductDetails />} />
<Route path="/category" element={<Categories />} />
<Route path="/:id" element={<ProductDetails />} />
<Route path="/contact" element={<Contact />} />
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/cart" element={<Cart />} />
<Route path="/cartPanel" element={<CartPanel />} />
<Route path="/checkoutDetails" element={<Elements stripe={stripePromise}><CheckoutDetails /></Elements>} />
<Route
path="/checkoutDetails"
element={<Elements stripe={stripePromise}><CheckoutDetails /></Elements>}
/>
<Route path="/cartPanel" element={<CartPanel />} />
<Route path="/checkout-success" element={<PaymentSuccess />} />
<Route path="/checkout-fail" element={<PaymentFail />} />
Expand All @@ -55,7 +57,6 @@ const App = () => {
<Route path="*" element={<Notfound />} />
</Routes>
</main>

<Footer />
</section>
);
Expand Down
16 changes: 8 additions & 8 deletions src/components/FindMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import findmore_cursuri from "../images/findmore_cursuri.png";
import findmore_hobby from "../images/findmore_hobby.png";

const categories = [
{ name: 'Spiritualitate', link: '/product/Spiritualitate', image: findmore_spiritualitate },
{ name: 'Excursii', link: '/product/Excursii', image: findmore_excursii },
{ name: 'Sănătate', link: '/product/Sanatate', image: findmore_sanatate },
{ name: 'Sport', link: '/product/Sport', image: findmore_sport },
{ name: 'Divertisment', link: '/product/Divertisment', image: findmore_evenimente },
{ name: 'Artă', link: '/product/Arta', image: findmore_arta },
{ name: 'Cursuri', link: '/product/Cursuri%20de%20limbi%20străine', image: findmore_cursuri },
{ name: 'Hobby', link: '/product/Hobby', image: findmore_hobby },
{ name: 'Spiritualitate', link: '/product?category=Spiritualitate', image: findmore_spiritualitate },
{ name: 'Excursii', link: '/product?category=Excursii', image: findmore_excursii },
{ name: 'Sănătate', link: '/product?category=Sanatate', image: findmore_sanatate },
{ name: 'Sport', link: '/product?category=Sport', image: findmore_sport },
{ name: 'Divertisment', link: '/product?category=Divertisment', image: findmore_evenimente },
{ name: 'Artă', link: '/product?category=Arta', image: findmore_arta },
{ name: 'Cursuri', link: '/product?category=Cursuri%20de%20limbi%20străine', image: findmore_cursuri },
{ name: 'Hobby', link: '/product?category=Hobby', image: findmore_hobby },
]

const Category = ({ category }) => {
Expand Down
50 changes: 25 additions & 25 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ import React from 'react';
import linkedin_svg from "../styles/icons/linkedin.svg";
import instagram_svg from "../styles/icons/instagram.svg";
import slash_svg from "../styles/icons/slash.svg";
import {NavLink} from "react-router-dom";
import {Link} from "react-router-dom";
import JoinUs from './JoinUs';

const categories = [
{ name: 'Spiritualitate', link: '/product/Spiritualitate'},
{ name: 'Excursii', link: '/product/Excursii'},
{ name: 'Sănătate', link: '/product/Sanatate'},
{ name: 'Sport', link: '/product/Sport'},
{ name: 'Divertisment', link: '/product/Divertisment'},
{ name: 'Artă', link: '/product/Arta'},
{ name: 'Cursuri', link: '/product/Cursuri%20de%20limbi%20străine'},
{ name: 'Hobby', link: '/product/Hobby'},
{ name: 'Spiritualitate', link: '/product?category=Spiritualitate'},
{ name: 'Excursii', link: '/product?category=Excursii'},
{ name: 'Sănătate', link: '/product?category=Sanatate'},
{ name: 'Sport', link: '/product?category=Sport'},
{ name: 'Divertisment', link: '/product?category=Divertisment'},
{ name: 'Artă', link: '/product?category=Arta'},
{ name: 'Cursuri', link: '/product?category=Cursuri%20de%20limbi%20străine'},
{ name: 'Hobby', link: '/product?category=Hobby'},
];

const locations = [
{ name: 'Bucharest', link: '/product/Bucharest'},
{ name: 'Cluj', link: '/product/Cluj'},
{ name: 'Timisoara', link: '/product/Timisoara'},
{ name: 'Iasi', link: '/product/Iasi'},
{ name: 'Constanta', link: '/product/Constanta'},
{ name: 'Sibiu', link: '/product/Sibiu'},
{ name: 'Oradea', link: '/product/Oradea'},
{ name: 'Brasov', link: '/product/Brasov'},
{ name: 'Craiova', link: '/product/Craiova'},
]
{ name: 'București', link: '/product?location=Bucuresti'},
{ name: 'Cluj', link: '/product?location=Cluj'},
{ name: 'Timișoara', link: '/product?location=Timisoara'},
{ name: 'Iași', link: '/product?location=Iasi'},
{ name: 'Constanța', link: '/product?location=Constanta'},
{ name: 'Sibiu', link: '/product?location=Sibiu'},
{ name: 'Oradea', link: '/product?location=Oradea'},
{ name: 'Brașov', link: '/product?location=Brasov'},
{ name: 'Craiova', link: '/product?location=Craiova'},
];

const CategoryRow = ({ categories }) => {
return (
Expand Down Expand Up @@ -71,23 +71,23 @@ const AboutSection = () => {
Despre SilverCare
</div>
<div className="self-stretch flex flex-col items-start justify-start gap-[8px]">
<NavLink to="/about">
<Link to="/about">
<div className="self-stretch relative tracking-[0.05em] leading-[24px] font-medium">
Povestea noastră
</div>
</NavLink>
</Link>

<NavLink to="/contact">
<Link to="/contact">
<div className="self-stretch relative tracking-[0.05em] leading-[24px] font-medium">
Devino partener
</div>
</NavLink>
</Link>

<NavLink to="/contact">
<Link to="/contact">
<div className="self-stretch relative tracking-[0.05em] leading-[24px] font-medium">
Intrebari și raspunsuri
</div>
</NavLink>
</Link>

</div>
</div>
Expand Down
19 changes: 9 additions & 10 deletions src/components/HomeSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,27 @@ const HomeSearch = () => {

const handleSearch = () => {
// Redirect to the search results page with the search term
navigate(`/product/search/${searchTerm}`);
navigate(`/product?search=${searchTerm}`);
};

const handleSearchChange = (e) => {
setSearchTerm(e.target.value);
};


return (
<div className="flex flex-col items-center justify-start py-[3.5rem] px-[0rem] box-border text-center text-[2.5rem]">
<div className="w-[77rem] flex flex-col items-center justify-center">
<div className="self-stretch flex flex-col items-center justify-start gap-[2.5rem]">
<div className="flex flex-col items-start justify-start gap-[1.5rem]">
<div className="relative tracking-[0.12em] leading-[120%] font-semibold flex items-center justify-center w-[57rem] h-[2.5rem] shrink-0">
<div className="flex flex-col items-center justify-start max-lg:py-[2rem] lg:py-[3.5rem] px-[0rem] box-border text-center max-lg:text-[1.88rem] lg:text-[2.5rem]">
<div className="max-lg:w-[20rem] max-lg:h-[15rem] lg:w-[77rem] flex flex-col items-center justify-center">
<div className="self-stretch flex flex-col items-center justify-center max-lg:gap-[1.5rem] lg:gap-[2.5rem]">
<div className="max-lg:self-stretch flex flex-col items-start justify-start max-lg:gap-[1rem] lg:gap-[1.5rem]">
<div className="max-lg:self-stretch relative tracking-[0.12em] leading-[120%] font-semibold lg:w-[57rem] lg:h-[2.5rem]">
Redescoperă magia vieții!
</div>
<div className="relative text-[1.5rem] tracking-[0.1em] leading-[120%] font-semibold flex items-center justify-center w-[57rem]">
<div className="relative max-lg:text-[1.13rem] lg:text-[1.5rem] tracking-[0.1em] leading-[120%] max-lg:font-medium lg:font-semibold flex items-center justify-center lg:w-[57rem]">
Activități și experiențe pentru vârstnici
</div>
</div>
<div className="self-stretch flex flex-col items-center justify-end py-[0rem] px-[13.13rem] text-left text-[1rem] text-text-fields-grey-hf">
<div className="self-stretch rounded-lg bg-white box-border h-[3.5rem] flex flex-row items-center justify-start py-[0rem] pr-[1.5rem] pl-[1rem] gap-[1rem] border-[1.5px] border-solid border-text-fields-grey-hf">
<div className="self-stretch flex flex-col items-center justify-end lg:px-[13.13rem] text-left max-lg:text-[0.75rem] lg:text-[1rem] text-text-fields-grey-hf">
<div className="self-stretch rounded-lg bg-white box-border max-lg:h-[3rem] lg:h-[3.5rem] flex flex-row items-center justify-start py-[0rem] pr-[1.5rem] pl-[1rem] gap-[1rem] border-[1.5px] border-solid border-text-fields-grey-hf">
<div className="flex-1 relative tracking-[0.08em] leading-[120%] flex items-center h-[2rem]">
<input
type="text"
Expand Down
Loading

0 comments on commit 5804f5c

Please sign in to comment.