Skip to content

Commit 9389ae3

Browse files
committed
contribute feature
1 parent c19e3ce commit 9389ae3

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ jobs:
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626
- run: npm ci
27-
- run: sed -i "s/REPLACE_TOKEN/${{ secrets.TOKEN }}/g" package.json
2827
- run: npm run build --if-present

.github/workflows/buildAndDeploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
node-version: ${{ matrix.node-version }}
1717
- name: Install and Build 🔧
1818
run: |
19-
sed -i "s/REPLACE_TOKEN/${{ secrets.TOKEN }}/g" package.json
2019
npm ci
2120
npm run build
2221

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"scripts": {
5353
"start": "react-scripts start",
54-
"build": "Token=REPLACE_TOKEN react-scripts build",
54+
"build": "react-scripts build",
5555
"build-localhost": "PUBLIC_URL=/ react-scripts build",
5656
"test": "react-scripts test",
5757
"eject": "react-scripts eject"

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const app = () => {
5151
</div>
5252
</section>
5353
<ReactTooltip place="bottom" type="dark" effect="solid" />
54-
<ToastContainer position="bottom-left" autoClose={5000} pauseOnHover={false} />
54+
<ToastContainer position="bottom-left" autoClose={8000} pauseOnHover={false} />
5555
</div>
5656
);
5757
};

src/component/modals/ContributeDetails.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ const ContributeDetails = ({ superState, dispatcher }) => {
1717
const [branch, setBranch] = useState('');
1818
const [showAdvanceOptions, setShowAdvanceOptions] = useState(false);
1919
const submit = async (e) => {
20-
const id = toast.loading('Processing Your Request.Please wait...');
20+
const id = toast.loading('Processing your Request.Please wait...');
2121
try {
2222
e.preventDefault();
23-
const result = await axios.post(`http://127.0.0.1:5000/contribute?study=${study}&auth=${auth}&desc=${desc}&title=${title}&path=${path}&branch=${branch}`, { token: process.env.TOKEN });
24-
// eslint-disable-next-line
25-
// console.log(process.env.Token);
23+
const result = await axios.post('http://127.0.0.1:5000/contribute', {
24+
study,
25+
auth,
26+
desc,
27+
title,
28+
path,
29+
branch,
30+
});
2631
toast.success(result.data?.message);
2732
} catch (error) {
2833
if (error?.response?.status === 400) {

0 commit comments

Comments
 (0)