Skip to content

Commit 4d67da6

Browse files
committed
ShopDB Redesign: Initial Commit
1 parent 584c33a commit 4d67da6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4498
-150
lines changed

.github/workflows/cicd.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CICD
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
workflow_dispatch:
8+
jobs:
9+
build_and_deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: aws-actions/configure-aws-credentials@v1
14+
with:
15+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
16+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17+
aws-region: us-east-1
18+
- name: Install dependencies
19+
run: npm install
20+
- name: Webpack
21+
run: npm run build
22+
- name: FRONTEND Deploy to S3
23+
run: aws s3 sync build s3://ecc-shopdb

package-lock.json

+855
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+13
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@
1010
"@types/node": "^16.18.11",
1111
"@types/react": "^18.0.26",
1212
"@types/react-dom": "^18.0.10",
13+
"moment": "^2.29.4",
1314
"react": "^18.2.0",
1415
"react-dom": "^18.2.0",
16+
"react-loader-spinner": "^5.3.4",
17+
"react-moment": "^1.1.3",
18+
"react-router-dom": "^6.6.2",
1519
"react-scripts": "5.0.1",
20+
"react-select": "^5.7.0",
21+
"react-tooltip": "^5.7.5",
22+
"string-similarity": "^4.0.4",
1623
"typescript": "^4.9.4",
1724
"web-vitals": "^2.1.4"
1825
},
@@ -39,5 +46,11 @@
3946
"last 1 firefox version",
4047
"last 1 safari version"
4148
]
49+
},
50+
"devDependencies": {
51+
"@types/string-similarity": "^4.0.0",
52+
"prettier": "^2.8.3",
53+
"prettier-plugin-tailwindcss": "^0.2.1",
54+
"tailwindcss": "^3.2.4"
4255
}
4356
}

public/favicon.ico

11.3 KB
Binary file not shown.

public/index.html

+18-28
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,33 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
4+
<meta charset="utf-8" prefix="og: http://ogp.me/ns#" />
5+
<meta
6+
name="image"
7+
property="og:image"
8+
content="%PUBLIC_URL%/meta-img.png"
9+
/>
10+
<meta name="author" content="Brice Frisco" />
611
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<meta name="theme-color" content="#000000" />
812
<meta
913
name="description"
10-
content="Web site created using create-react-app"
14+
content="Find items to buy or sell on EcoCityCraft"
1115
/>
16+
<meta property="og:title" content="EcoCityCraft ShopDB" />
17+
<meta property="og:url" content="http://shopdb.ecocitycraft.com/" />
18+
<meta
19+
property="og:description"
20+
content="Find items to buy or sell on EcoCityCraft"
21+
/>
22+
<meta name="theme-color" content="#000000" />
23+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
1224
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
1725
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
27-
<title>React App</title>
26+
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
27+
<title>Home - ShopDB</title>
2828
</head>
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>
3131
<div id="root"></div>
32-
<!--
33-
This HTML file is a template.
34-
If you open it directly in the browser, you will see an empty page.
35-
36-
You can add webfonts, meta tags, or analytics to this file.
37-
The build step will place the bundled scripts into the <body> tag.
38-
39-
To begin the development, run `npm start` or `yarn start`.
40-
To create a production bundle, use `npm run build` or `yarn build`.
41-
-->
4232
</body>
4333
</html>

public/logo.png

96 KB
Loading

public/logo192.png

20.7 KB
Loading

public/logo512.png

114 KB
Loading

public/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"short_name": "React App",
3-
"name": "Create React App Sample",
2+
"short_name": "ECCShopDB",
3+
"name": "EcoCityCraft ShopDB",
44
"icons": [
55
{
66
"src": "favicon.ico",

public/meta-img.png

160 KB
Loading

src/App.css

-38
This file was deleted.

src/App.test.tsx

-9
This file was deleted.

src/App.tsx

-26
This file was deleted.

src/components/Breadcrumbs.tsx

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import CaretRight from "../icons/CaretRight";
2+
import Home from "../icons/Home";
3+
import { Link } from "react-router-dom";
4+
5+
type BreadcrumbProps = {
6+
children: JSX.Element | string;
7+
hasPrevious?: boolean;
8+
to: string;
9+
};
10+
11+
export const Breadcrumb = ({ children, hasPrevious, to }: BreadcrumbProps) => {
12+
return (
13+
<>
14+
{hasPrevious && <CaretRight className="h-6 w-6" />}
15+
<Link to={to}>
16+
<li className="flex cursor-pointer items-center text-sm font-medium capitalize hover:text-white">
17+
{children === "Home" && <Home className="mr-2 h-4 w-4" />}
18+
{children}
19+
</li>
20+
</Link>
21+
</>
22+
);
23+
};
24+
25+
type Props = {
26+
children: JSX.Element | JSX.Element[];
27+
};
28+
29+
export const Breadcrumbs = ({ children }: Props) => {
30+
return (
31+
<nav className="flex">
32+
<ol className="inline-flex items-center space-x-1 text-gray-400 md:space-x-3">
33+
{children}
34+
</ol>
35+
</nav>
36+
);
37+
};

src/components/Checkbox.tsx

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
type Props = {
2+
id: string;
3+
className?: string;
4+
checked?: any;
5+
onChange?: any;
6+
children: any;
7+
};
8+
9+
const Checkbox = ({ id, className, checked, onChange, children }: Props) => {
10+
return (
11+
<div className={`flex select-none items-center ${className || ""}`}>
12+
<input
13+
id={id}
14+
type="checkbox"
15+
className="cursor-pointer accent-sky-400"
16+
onChange={onChange}
17+
checked={checked}
18+
/>
19+
<label
20+
htmlFor={id}
21+
className="ml-2 cursor-pointer text-sm font-medium text-gray-300"
22+
>
23+
{children}
24+
</label>
25+
</div>
26+
);
27+
};
28+
29+
export default Checkbox;

0 commit comments

Comments
 (0)