- A Vite Shop written in typescript by Omar Ashraf Zeinhom as trainning for typescript Projects
- GUI and everything was built from scratch
- However this was a learning project so all credits go to WebDevSimplified In terms of the page logic
- Again this was just a learning project so i just adapted it a little bit
- Required
Vite js Docs - Scaffolding Your First Vite Project
yarn create vite
- Install Packages
yarn install
- Start Server by
yarn run dev
- Go to
http://127.0.0.1:5173/
-
Packages were added using
yarn add mdb-react-ui-kit react-router-dom stripe @fortawesome/fontawesome-free
and add CSS FILES to
index.html
``
- Usage with TypeScript in Stripe
import Stripe from 'stripe';
const stripe = new Stripe('sk_test_...', {
apiVersion: '2022-08-01',
});
const createCustomer = async () => {
const params: Stripe.CustomerCreateParams = {
description: 'test customer',
};
const customer: Stripe.Customer = await stripe.customers.create(params);
console.log(customer.id);
};
createCustomer();
- React TypeScript offical language docs
- Stripe - Usage with TypeScript
- cjav_dev answer at How to use stripe types in typescript Vikram Khemlani
- Navbar - MDB Boostrap React
- Date.now() method
- Colors - MDBBootstrap
- Text wrapping and overflow - MDBBootstrap
- Icon notifications - MDBBootstrap
- Array.prototype.reduce()