Skip to content

Commit

Permalink
pricing page
Browse files Browse the repository at this point in the history
  • Loading branch information
student-nitjalandhar committed Oct 25, 2024
1 parent 62dd635 commit 43fe357
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 43 deletions.
35 changes: 0 additions & 35 deletions client/pricing.js

This file was deleted.

53 changes: 53 additions & 0 deletions client/src/pages/pricing.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';
import './Pricing.css'; // Create a CSS file to style the pricing page

const Pricing = () => {
return (
<div className="pricing-container">
<h1 className="pricing-title">Our Pricing Plans</h1>

<div className="pricing-plans">
{/* Basic Plan */}
<div className="pricing-card">
<h2 className="plan-title">Basic</h2>
<p className="plan-price">$9.99/month</p>
<ul className="plan-features">
<li>Feature 1</li>
<li>Feature 2</li>
<li>Feature 3</li>
</ul>
<button className="plan-button">Get Started</button>
</div>

{/* Standard Plan */}
<div className="pricing-card">
<h2 className="plan-title">Standard</h2>
<p className="plan-price">$19.99/month</p>
<ul className="plan-features">
<li>Feature 1</li>
<li>Feature 2</li>
<li>Feature 3</li>
<li>Feature 4</li>
</ul>
<button className="plan-button">Get Started</button>
</div>

{/* Premium Plan */}
<div className="pricing-card">
<h2 className="plan-title">Premium</h2>
<p className="plan-price">$29.99/month</p>
<ul className="plan-features">
<li>Feature 1</li>
<li>Feature 2</li>
<li>Feature 3</li>
<li>Feature 4</li>
<li>Feature 5</li>
</ul>
<button className="plan-button">Get Started</button>
</div>
</div>
</div>
);
};

export default Pricing;
57 changes: 57 additions & 0 deletions client/src/styles/pricing.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.pricing-container {
text-align: center;
padding: 50px;
}

.pricing-title {
font-size: 2.5rem;
margin-bottom: 30px;
}

.pricing-plans {
display: flex;
justify-content: center;
gap: 20px;
}

.pricing-card {
background-color: #f5f5f5;
padding: 20px;
border-radius: 8px;
width: 300px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.plan-title {
font-size: 1.5rem;
margin-bottom: 10px;
}

.plan-price {
font-size: 2rem;
color: #007bff;
margin-bottom: 20px;
}

.plan-features {
list-style: none;
padding: 0;
margin-bottom: 20px;
}

.plan-features li {
margin: 10px 0;
}

.plan-button {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}

.plan-button:hover {
background-color: #0056b3;
}
13 changes: 5 additions & 8 deletions server/controllers/auth/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const registerUser = async (req, res) => {
const loginUser = async (req, res) => {
try {
// Log the incoming request body to see what data is being received
console.log("Received Data:", req.body);
console.log("Received Data:", req.body);

const parsedData = loginSchema.parse(req.body);
const { type, email, password } = parsedData;
Expand Down Expand Up @@ -144,7 +144,6 @@ const loginUser = async (req, res) => {
}
};


const createUserFromGoogleSignIn = async (googleProfile) => {
try {
const { id, displayName, emails } = googleProfile;
Expand Down Expand Up @@ -328,12 +327,10 @@ const resetPassword = async (req, res) => {
.status(400)
.json({ message: "Validation error", errors: error.errors });
}
res
.status(500)
.json({
message: "Error resetting password",
error: error.message || "An unknown error occurred",
});
res.status(500).json({
message: "Error resetting password",
error: error.message || "An unknown error occurred",
});
}
};

Expand Down

0 comments on commit 43fe357

Please sign in to comment.