Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aindree-2005 committed Dec 9, 2023
2 parents 55adb4c + 8db4f99 commit 6b924c4
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- If your PR fixes an open issue, use `Closes #435` to link your PR with the issue. #435 stands for the issue number you are fixing -->

## Fixes Issue

<!-- Example: Closes #31 -->

## Changes proposed

<!-- List all the proposed changes in your PR -->
69 changes: 69 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
### 🧑‍💻 Contribution Guidelines

## Introduction
We deeply value your enthusiasm for enhancing this project! We warmly welcome your valuable contributions and invite you to participate in elevating it to new heights.

## Getting Started
There are some steps that you need to follow before making any contribution in this project, the following steps are important to get start.


### Step 1. Fork the Repository
[Fork](https://github.com/MonalikaPatnaik/SheEARNS/fork) the repo first

### Step 2. Clone the forked Repository
```
git clone https://github.com/<your_github_username>/SheEARNS.git
```
### Step 3. Set Up Remotes
- Add a reference (remote) to the original repository:
```
git remote add upstream https://github.com/MonalikaPatnaik/SheEARNS.git
```
- Add a reference (remote) to your forked repository:
```
git remote add origin https://github.com/<your_user_name>/SheEARNS.git
```
### Step 4. Check Remotes
```
git remote -v
```
### Step 5. Keep Your Local Copy Updated
```
git pull upstream main
```
### Step 6. Create a New Branch
```
git checkout -b <your_branch_name>
```
## Making Changes
Perform your desired changes to the code base.
### Step 7. Track Changes
```
# Track the changes
git status
# Add changes to Index
git add . or git add <file_name>
```
### Step 8. Commit Changes
```
git commit -m "Write a meaningful but small commit message"
```
### Step 9. Push Changes
```
git push -u origin <your_branch_name>
```
### 10. Compare and Create
- Click on "Compare And Pull Requests" 🔄
- Make sure your pull request adheres to our contribution guidelines. Pull requests that do not meet the guidelines may be closed or discarded ❌
- Add an appropriate title and description to your pull request, explaining your changes with suitable explanations and screenshots 📝🖼️
- Click on "Create Pull Request" to submit your contribution for review ✅
We appreciate your understanding and cooperation in following our guidelines. Thank you for your contribution! 🙌
Congratulations! You've made your PR with the desired changes. Once the PR is reviewed, it will be merged into the original codebase for everyone to see and use.
## Thank You!
Thank you so much for contributing. We appreciate your valuable input, and we hope to see you again soon. 😊
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
# SheEarns

## Overview

SheEarns is a web application dedicated to giving exposure to small local businesses run by individuals, such as housewives or entrepreneurs working from their homes or small spaces. The platform aims to empower and uplift these businesses by providing them with a virtual space to create their online shops and showcase their work. The goal is to help these individuals increase their income and expand their reach to a wider audience that may not have discovered them otherwise.

## Features

- **Virtual Shop Creation**: SheEarns allows small business owners to easily create and customize their virtual shops, providing them with an online presence to showcase their products or services.

- **Showcase Artisanal Work**: Individuals can highlight their unique and artisanal creations, reaching potential customers who appreciate and value handmade or locally sourced products.

- **Increased Visibility**: The platform is designed to increase the visibility of small businesses, making it easier for users to discover and support local entrepreneurs.

- **Income Expansion**: By leveraging the virtual space provided by SheEarns, small businesses have the opportunity to significantly expand their income and customer base.

- **Community Engagement**: Users can engage with the SheEarns community, fostering a supportive environment where people can discover, connect, and support local businesses.

## How it Works

1. **Create Your Shop**: Entrepreneurs can easily sign up and create their virtual shop on SheEarns, providing essential details about their business and offerings.

2. **Customize Your Space**: Users have the flexibility to customize their shop space, adding images, descriptions, and other details to make their online presence unique and appealing.

3. **Showcase Your Work**: Individuals can showcase their products or services effectively, providing potential customers with a glimpse of their skills and offerings.

4. **Connect with Customers**: SheEarns enables direct interaction between business owners and customers, fostering a sense of community and personalized engagement.

# SheEarns

Expand Down
21 changes: 21 additions & 0 deletions client/package-lock.json

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

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"react-redux": "^8.0.5",
"react-router-dom": "^6.8.1",
"react-scripts": "^5.0.1",
"react-toastify": "^9.1.3",
"redux": "^4.2.1",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.2",
Expand Down
11 changes: 10 additions & 1 deletion client/src/pages/CreateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import BreadCrumb from "../components/BreadCrumb";
import Container from "../components/Container";
import CustomInput from "../components/CustomInput";
import { useAuth0 } from "@auth0/auth0-react";
import Loader from "../components/Loader";
const CreateStore = () => {

//used to disable button when clicked once in createstore form
const [isButtonDisabled, setIsButtonDisabled] = useState(false);
const [formData, setFormData] = useState({
name: "",
category: "",
Expand Down Expand Up @@ -42,6 +45,8 @@ const CreateStore = () => {
return;
}

setIsButtonDisabled(true);

console.log("Form submitted");

const formDataForBackend = new FormData();
Expand All @@ -55,18 +60,22 @@ const CreateStore = () => {

const response = await axios.post("https://sheearns.onrender.com/createShop", formDataForBackend);

setIsButtonDisabled(false);

console.log("Store created:", response.data);
window.location.href = '/';
} catch (error) {

setIsButtonDisabled(false);

console.error("Error creating store:", error);
}
console.log("After Axios request");
};

return (
<>
{isButtonDisabled && <Loader />}
<Meta title={"Create Store"} />
<BreadCrumb title="Create Store" />

Expand Down Expand Up @@ -99,7 +108,7 @@ const CreateStore = () => {
/>
<div>
<div className="mt-3 d-flex justify-content-center gap-15 align-items-center">
<button type="submit" className="button border-0">
<button type="submit" className="button border-0" disabled={isButtonDisabled}>
Submit
</button>
</div>
Expand Down

0 comments on commit 6b924c4

Please sign in to comment.