Skip to content

Commit

Permalink
Merge pull request #23 from builtbysuraj/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
builtbysuraj authored Feb 12, 2024
2 parents 73dd4ce + 6964a21 commit b9d8f1b
Show file tree
Hide file tree
Showing 112 changed files with 2,762 additions and 1,245 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
45 changes: 45 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#npx lint-staged


echo '
💅🛠️ Formatting and testing project before committing...
'

# Check tsconfig standards
npm run check-types ||
(
echo '
TypeScript Check Failed. ❌
Make the required changes listed above, add changes and try to commit again.
'
false;
)


# Check ESLint Standards
npm run check-lint ||
(
echo '
ESLint Check Failed. ❌
Make the required changes listed above, add changes and try to commit again.
'
false;
)


# Check Prettier standards
npm run check-format-client ||
(
echo '
Prettier Check Failed. ❌
Run npm run format, add changes and try commit again.';
false;
)

npm run check-format-server ||
(
echo '
Prettier Check Failed. ❌
Run npm run format, add changes and try commit again.';
false;
)
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <link rel="icon" type="image/svg+xml" href="./public/favicon.ico" /> -->
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
Online Shopping Site for Mobiles, Electronics, Furniture, Grocery,
Expand Down
64 changes: 33 additions & 31 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@
"build": "vite build",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"check-lint": "eslint . --ext ts,tsx",
"check-types": "tsc --pretty --noEmit",
"test": "vitest",
"format": "prettier --write ./src"
"format": "prettier --write ./src",
"check-format": "prettier --check ./src"
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.2",
"@reduxjs/toolkit": "^2.0.1",
"@tanstack/react-query": "^5.17.10",
"axios": "^1.6.4",
"classnames": "^2.5.1",
"lodash.debounce": "^4.0.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-image-gallery": "^1.3.0",
"react-redux": "^9.0.4",
"react-router-dom": "^6.21.0"
},
Expand Down
1 change: 1 addition & 0 deletions client/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
4 changes: 2 additions & 2 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { Footer, Header } from './layouts'

export default function App() {
return (
<div className="AppContainer">
<main className="AppContainer">
<Header />
<Suspense fallback="Loading...">
<Outlet />
</Suspense>
<Footer />
</div>
</main>
)
}
22 changes: 22 additions & 0 deletions client/src/assets/css/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.AppContainer {
background-color: #f1f3f6;
z-index: -1;
min-height: 100vh;
}

hr {
border-top: 1px solid rgba(96, 96, 96, 0.217);
margin: 15px 0 0 0;
}

.sidebar section {
margin: 10px 0;
}

.sidebar section input {
margin: 8px 0;
}

.sidebar section label {
padding: 0 10px;
}
31 changes: 22 additions & 9 deletions client/src/assets/css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ html {
font-family: system-ui, sans-serif;
}

html,
body {
line-height: 1.5;
min-height: 100vh;
min-width: 100vw;
/* overflow-x: hidden; */
height: 100%;
}

.AppContainer {
background-color: #f1f3f6;
z-index: -1;
body {
line-height: 1.5;
min-height: 100vh;
min-width: 100rem;
max-width: 100vw;
}

input,
Expand All @@ -32,7 +29,23 @@ select {
font: inherit;
}

/* responsive images/videos */
input[type='radio'],
label[for] {
cursor: pointer;
}

input[type='text'],
input[type='number'],
select,
textarea {
font-size: 16px;
}

button:disabled {
opacity: 0.5;
pointer-events: none;
}

img,
picture,
svg,
Expand Down
Binary file added client/src/assets/img/fa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions client/src/assets/img/shield.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions client/src/components/Form.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.login-container {
.form-container {
margin: 1.4rem auto;
width: 50rem;
height: 31rem;
Expand All @@ -15,13 +15,13 @@
height: 100%;
}

.login-title {
.form-title {
font-size: 1.7rem;
font-weight: 500;
margin: 0.5rem 0;
}

.login-desc {
.form-desc {
color: #dbdbdb;
font-size: 1.1rem;
}
Expand All @@ -32,15 +32,15 @@
height: 100%;
}

.right form {
.right .form {
margin-top: 2rem;
display: flex;
align-items: center;
flex-direction: column;
gap: 0.8rem;
}

form input {
.form input {
width: 100%;
padding: 0.4rem 1rem;
margin: 0.6rem 0;
Expand All @@ -49,11 +49,11 @@ form input {
border: 0;
border-bottom: 1px solid grey;
}
input::placeholder {
.form input::placeholder {
opacity: 0.7;
}

form button {
.form button {
border: 0;
background-color: #fb641b;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
Expand All @@ -64,7 +64,7 @@ form button {
color: white;
}

small {
.form-small {
text-align: left;
font-size: 0.7rem;
color: #878787;
Expand Down
Loading

0 comments on commit b9d8f1b

Please sign in to comment.