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

Added Store Finding and Advertising Web App #161

Merged
merged 1 commit into from
Oct 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
6 changes: 6 additions & 0 deletions Store Exploring Website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Finditt

- It is a store exploring and recommending website
- It is made with react and redux

## Deployed at - https://findittt.netlify.app/
29,030 changes: 29,030 additions & 0 deletions Store Exploring Website/package-lock.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions Store Exploring Website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "store-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@mui/icons-material": "^5.8.0",
"@mui/material": "^5.8.1",
"@reduxjs/toolkit": "^1.8.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/baker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/butcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/chemist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/grocery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/main1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/main2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Store Exploring Website/public/images/main3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions Store Exploring Website/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Empty file.
27 changes: 27 additions & 0 deletions Store Exploring Website/src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Home from "./components/Body/Home";
import Catalogue from "./components/Body/Catalogue";
import Navbar from "./components/Header";
import AddStore from "./components/Body/AddStore";
import { Notification } from "./Notification";
import "./App.css";


function App() {
return (
<div className="App">
<BrowserRouter>
<Routes>
<Route path="/" element={<><Navbar /><Home /></>} />
<Route path="/catalogue" element={<><Navbar /><Catalogue /></>} />
<Route path="/addstore" element={<><Navbar /><AddStore /></>} />


</Routes>
</BrowserRouter>
<Notification />
</div>
);
}

export default App;
66 changes: 66 additions & 0 deletions Store Exploring Website/src/Notification.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React, { useState } from "react";
import Stack from "@mui/material/Stack";
import Snackbar from "@mui/material/Snackbar";
import MuiAlert from "@mui/material/Alert";
import Slide from "@mui/material/Slide";
const Alert = React.forwardRef(function Alert(props, ref) {
return <MuiAlert elevation={6} ref={ref} variant="filled" {...props} />;
});

let open = false,
setOpen,
message,
setMessage,
severity,
setSeverity,
timeout,
setTimeout;

const createNotification = (gotMessage, gotSeverity, timeout) => {
setOpen(false);
setMessage(gotMessage);
setSeverity(gotSeverity);
if (timeout !== undefined) {
setTimeout(timeout);
}
setOpen(true);
};

function TransitionDown(props) {
return <Slide {...props} direction="down" />;
}

const Notification = () => {
[open, setOpen] = useState(false);
[message, setMessage] = useState("");
[severity, setSeverity] = useState("");
[timeout, setTimeout] = useState(3000);
React.useEffect(() => {
setTimeout(() => {
setOpen(false);
}, 1000);
}, []);

const handleClose = (event, reason) => {
if (reason === "clickaway") {
return;
}
setOpen(false);
};
return (
<Stack spacing={2} sx={{ width: "100%" }}>
<Snackbar
open={open}
autoHideDuration={timeout}
TransitionComponent={TransitionDown}
onClose={handleClose}
anchorOrigin={{ vertical: "top", horizontal: "center" }}
>
<Alert onClose={handleClose} severity={severity} sx={{ width: "100%" }}>
{message}
</Alert>
</Snackbar>
</Stack>
);
};
export { createNotification, Notification };
11 changes: 11 additions & 0 deletions Store Exploring Website/src/app/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { configureStore } from "@reduxjs/toolkit";
import storesReducer from "../features/storesSlice";

// redux store -- state of the app
const store = configureStore({
reducer: {
stores: storesReducer,
},
});

export default store;
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
.main-container {
height: 90vh;
width: 100%;
}

.add-store-container {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50vw;
padding: 30px 10px;
border-radius: 11px;
background: #ffffff;
box-shadow: 0px 3px 3px -2px rgb(0 0 0 / 20%), 0px 3px 4px 0px rgb(0 0 0 / 14%), 0px 1px 8px 0px rgb(0 0 0 / 12%);
}

.add-store-icon {
height: 80px;
display: block;
margin: auto;
}

.add-store-header {
font-size: 1.5rem;
font-weight: 600;
color: rgb(114, 114, 114);
text-align: center;
}

.add-store-input-container {
margin-top: 15px !important;
}

.add-store-inputs {
width: 90%;
display: block;
margin: auto;
}

.add-store-alpha-inputs {
margin-top: 15px !important;
}

.add-store-button-new-page {
width: fit-content;
display: block;
margin: auto;
margin-top: 40px;
}

@media screen and (max-width: 899px) {
.add-store-container {
border: unset;
background-color: white;
box-shadow: none;
padding: 10px;
margin-top: 25px;
}

.add-store-container {
width: 70vw;
}

.add-store-alpha-inputs {
margin-top: 10px !important;
}

.add-store-icon {
height: 70px;
}

.add-store-header {
font-size: 1.3rem;

}

.add-store-button {
margin-top: 25px;

}
}
Loading