Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #205

Open
wants to merge 34 commits into
base: lesson-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f928695
second-commint
OneBraveHero Mar 1, 2023
a16a534
updating our directory page whit category-menu components & category-…
OneBraveHero Mar 1, 2023
91a07a0
add navbar also Routes and links
OneBraveHero Mar 2, 2023
dc9cd0e
added our sing in component as well as firebase utils and brought in …
OneBraveHero Mar 9, 2023
08ea900
adding sing in whit Google and sing in whit Email&Password
OneBraveHero Mar 14, 2023
0288020
fix Sing in whitEmailAndPassword bugs and create input component , bu…
OneBraveHero Mar 15, 2023
916644e
created a sing in page component alongside sing in form
OneBraveHero Mar 16, 2023
62c325e
Finish Unsubscribe Method
OneBraveHero Mar 24, 2023
06be95a
adding cart context and shopping icon
OneBraveHero Apr 5, 2023
e7e62b1
adding items to cart
OneBraveHero Apr 11, 2023
8caca70
added in our addToCart feature
OneBraveHero Apr 13, 2023
5cc53ed
created a checkout page whit checkout items & cart functionality
OneBraveHero Apr 27, 2023
da44f36
add and get collection from Firebase and render in shop page
OneBraveHero May 4, 2023
e0e41f4
change categories menu to directory and add links to render shop/pages
OneBraveHero May 8, 2023
f1deb45
start implementing <styled-components>
OneBraveHero May 11, 2023
dcc82cd
continue styling navigation , directory, card-items styles whit styled-C
OneBraveHero May 11, 2023
48840f7
finish to move all the sass styles to styled-components
OneBraveHero May 12, 2023
10d213d
finish all the last touches
OneBraveHero May 12, 2023
27f5a8c
retoches of the las touches
OneBraveHero May 12, 2023
9b8a585
adding redirects for netlify
OneBraveHero May 16, 2023
fc6a11a
add reducers hooks to my cart and user ''context''
OneBraveHero May 23, 2023
df8384d
emigrate user context to React Redux
OneBraveHero May 29, 2023
534874b
emigrate categories context to React Redux
OneBraveHero May 30, 2023
16fc2d0
improve the logic in the category selector and firebase
OneBraveHero May 30, 2023
b6d12c6
adding "Reselect" to memoization the categories selector values
OneBraveHero Jun 5, 2023
b0e1ffd
fully migrate cart context to React/Redux delete context folder
OneBraveHero Jun 21, 2023
b612c15
Pause to practice React/Redux VS Context
OneBraveHero Jul 14, 2023
0c4ac0f
adding Redux-Devtools to the storw
OneBraveHero Aug 11, 2023
faa3ab4
Redux-Thung implemented
OneBraveHero Sep 5, 2023
56c40c2
fetchCategoriesAsync Thunk to Saga
OneBraveHero Sep 21, 2023
a930643
convert Sign In/Up to Redux-Sagas
OneBraveHero Feb 6, 2024
d2aab51
Fixing a Index.scss Bug
OneBraveHero Feb 15, 2024
ce02669
Implementing Stripe Payment
OneBraveHero Feb 29, 2024
337ed15
fixing .env files
OneBraveHero Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/.pnp
.pnp.js

.env

# testing
/coverage

Expand All @@ -21,3 +23,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Local Netlify folder
.netlify
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# How to fork and clone

One quick note about cloning this project. If you wish to make commits and push your own code, you'll need to fork the project first. Forking allows you to have your own copy of this repository by adding a duplicate version in your own profile!

You can see the fork button in the top right corner of every GitHub project; click it and a copy of the project will be added to your GitHub profile under the same name as the original project.
Expand All @@ -10,6 +11,7 @@ After forking the project, simply clone it the way you would from the new forked
# After you fork and clone:

## Install dependencies

In your terminal after you clone your project down, remember to run either `yarn` or `npm install` to build all the dependencies in the project.

## Set your firebase config
Expand All @@ -23,11 +25,15 @@ Remember to replace the config variable in your firebase.utils.js with your own
After forking this repository and cloning it down, you will have access to all the lesson branches with code at different checkpoints throughout the course. If for some reason you need to work from the codebase at one of these lesson branch checkpoints, follow these steps:

1. Checkout to the lesson-# (let's use lesson-15 as an example) branch

```
git checkout lesson-15
```

2. Branch off from lesson-15. This will create a new branch where the code of lesson-15 is the basis for your new branch. You can name your new branch whatever you want! Let's say we use my-main-branch as the name.

```
git checkout -b my-main-branch
```

3. Now you can just code on this branch, push code from this branch up to your forked repo etc. The main thing to remember is that you want to be on this branch for your own code, so remember what you named this branch!
26 changes: 26 additions & 0 deletions netlify/functions/create-payment-intent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require("dotenv").config();
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);

exports.handler = async (event) => {
try {
const { amount } = JSON.parse(event.body);

const paymentIntent = await stripe.paymentIntents.create({
amount,
currency: "usd",
payment_method_types: ["card"],
});

return {
statusCode: 200,
body: JSON.stringify({ paymentIntent }),
};
} catch (error) {
console.log({ error });

return {
statusCode: 400,
body: JSON.stringify({ error }),
};
}
};
Loading