-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
afcd6c5
commit 366511a
Showing
12 changed files
with
625 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { configureStore } from '@reduxjs/toolkit' | ||
import counterReducer from '../features/counter/counterSlice' | ||
import { configureStore } from "@reduxjs/toolkit"; | ||
import basketReducer from "../slices/basketSlice"; | ||
|
||
export const store = configureStore({ | ||
reducer: { | ||
counter: counterReducer, | ||
basket: basketReducer, | ||
}, | ||
}) | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,41 @@ | ||
import { Counter } from '../features/counter/Counter' | ||
import styles from '../styles/Home.module.css' | ||
import Head from 'next/head' | ||
import Head from "next/head"; | ||
|
||
export default function Home() { | ||
return ( | ||
<div className={styles.container}> | ||
<div> | ||
<Head> | ||
<title>Redux Toolkit</title> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<title>Amazon 2.0</title> | ||
</Head> | ||
<header className={styles.header}> | ||
<img src="/logo.svg" className={styles.logo} alt="logo" /> | ||
<Counter /> | ||
<p> | ||
Edit <code>src/App.tsx</code> and save to reload. | ||
</p> | ||
<span> | ||
<span>Learn </span> | ||
<a | ||
className={styles.link} | ||
href="https://reactjs.org/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
React | ||
</a> | ||
<span>, </span> | ||
<a | ||
className={styles.link} | ||
href="https://redux.js.org/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Redux | ||
</a> | ||
<span>, </span> | ||
<a | ||
className={styles.link} | ||
href="https://redux-toolkit.js.org/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Redux Toolkit | ||
</a> | ||
,<span> and </span> | ||
|
||
{/* ---- TO BEGIN, delete this section and GET CODING!!! ---- */} | ||
<center className="grid place-items-center mt-10"> | ||
<h1 className="text-5xl">Lets build Amazon 2.0</h1> | ||
<h2>This is your starter template!</h2> | ||
<br /> | ||
<h3 className="font-bold"> | ||
We will be using Next.js / Tailwind CSS / Redux / Firebase / NextAuth | ||
</h3> | ||
<i>(Dont worry, its all setup and ready to use!)</i> | ||
<h4>Get Ready, Get Set, GO!!!</h4> | ||
|
||
<h5 className="mb-10">#PAPAFAM</h5> | ||
|
||
<div className="bg-red-300 p-10"> | ||
<p className="font-bold"> | ||
Dont forget to register for the challenge here! | ||
</p> | ||
<p>👇👇👇</p> | ||
<a | ||
className={styles.link} | ||
href="https://react-redux.js.org/" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href="https://www.papareact.com/secret-challenge" | ||
className="text-blue-400 underline p-3 font-bold" | ||
> | ||
React Redux | ||
CLICK HERE TO REGISTER NOW | ||
</a> | ||
</span> | ||
</header> | ||
</div> | ||
|
||
<p className="mt-24">Built with 💙 by Sonny Sangha (PAPA REACT)</p> | ||
</center> | ||
{/* ---- ---- */} | ||
</div> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { createSlice } from "@reduxjs/toolkit"; | ||
|
||
const initialState = { | ||
items: [], | ||
}; | ||
|
||
export const basketSlice = createSlice({ | ||
name: "basket", | ||
initialState, | ||
reducers: { | ||
addToBasket: (state, action) => {}, | ||
removeFromBasket: (state, action) => {}, | ||
}, | ||
}); | ||
|
||
export const { addToBasket, removeFromBasket } = basketSlice.actions; | ||
|
||
// Selectors - This is how we pull information from the Global store slice | ||
export const selectItems = (state) => state.basket.items; | ||
|
||
export default basketSlice.reducer; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
html, | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, | ||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"], | ||
darkMode: false, // or 'media' or 'class' | ||
theme: { | ||
extend: {}, | ||
}, | ||
variants: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
Oops, something went wrong.