Skip to content

Commit

Permalink
Merge branch 'develop' into favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov authored Aug 16, 2023
2 parents 7be110f + adf24d9 commit 4263c8a
Show file tree
Hide file tree
Showing 23 changed files with 374 additions and 261 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI/CD

on:
push:
branches:
- develop

jobs:
deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: Checkout repository
uses: actions/checkout@v2
env:
CI: false

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
env:
CI: false

- name: Install dependencies
run: npm install
env:
CI: false

- name: Deploy
run: |
git config --global user.name $user_name
git config --global user.email $user_email
git remote set-url origin https://${github_token}@github.com/${repository}
npm run deploy
env:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
repository: ${{ github.repository }}
CI: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.pnp
.pnp.js
/package-lock.json
/bin

# testing
/coverage
Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.3",
"@tanstack/react-query": "^4.32.6",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down Expand Up @@ -55,6 +56,8 @@
},
"devDependencies": {
"@hookform/devtools": "^4.3.1",
"@tanstack/eslint-plugin-query": "^4.32.5",
"gh-pages": "^5.0.0"
}
},
"proxy": "https://qa.digit.org"
}
31 changes: 31 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>Single Page Apps for GitHub Pages</title>
<script type="text/javascript">

var segmentCount = 1;

var l = window.location;
if (l.pathname == "/?/JIRA-CLONE/home") {
l.replace("/JIRA-CLONE/home")
} else if (l.pathname == "/?/JIRA-CLONE/signup") {
l.replace("/JIRA-CLONE/signup")
}
l.replace(
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
l.pathname.split('/').slice(0, 1 + segmentCount).join('/') + '/?p=/' +
l.pathname.slice(1).split('/').slice(segmentCount).join('/').replace(/&/g, '~and~') +
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
l.hash
);

</script>
</head>

<body>
</body>

</html>
26 changes: 17 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,23 @@
</head>

<body>
<script>
const pathSegments = window.location.pathname.split('/');
if (pathSegments.length === 2 && pathSegments[1] === 'JIRA-CLONE' && pathSegments[2] == 'home') {
// Redirect to the main page if the URL has "/JIRA-CLONE" prefix
window.location.replace('/JIRA-CLONE/home'); // Redirect to "/JIRA-CLONE/home"
} else if (pathSegments.length === 2 && pathSegments[1] === 'JIRA-CLONE' && pathSegments[2] == 'signup') {
// Redirect to the signup page if the URL has "/JIRA-CLONE/signup" pattern
window.location.replace('/JIRA-CLONE/signup'); // Redirect to "/JIRA-CLONE/signup"
}
<script type="text/javascript">
(function (l) {
if (l.search) {
var q = {};
l.search.slice(1).split('&').forEach(function (v) {
var a = v.split('=');
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
});
if (q.p !== undefined) {
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + (q.p || '') +
(q.q ? ('?' + q.q) : '') +
l.hash
);
}
}
}(window.location))
</script>
<div id="root"></div>
<!--
Expand Down
25 changes: 0 additions & 25 deletions src/404.html

This file was deleted.

8 changes: 1 addition & 7 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,15 @@ import HomePage from "./pages/homepage/HomePage";
import SignUp from "./components/Navbar/signup";

function App() {



return (
<div className="App">


<BrowserRouter basename="/JIRA-CLONE"> {/* Adjust the basename */}
<BrowserRouter basename="/JIRA-CLONE">
<Routes>
<Route path="/" element={<LoginPage />} />
<Route path="/home" element={<HomePage />} />
<Route path="/signup" element={<SignUp />} />
</Routes>
</BrowserRouter>

</div>
);
}
Expand Down
44 changes: 0 additions & 44 deletions src/Components/Sidebar/index.css

This file was deleted.

26 changes: 0 additions & 26 deletions src/Components/Sidebar/index.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import axios from "axios";

const instance = axios.create({
baseURL: "/egov-workflow-v2", // Base URL of the API
headers: {
"Content-Type": "application/json;charset=UTF-8",
Accept: "application/json, text/plain, */*",
},
});

export default instance;
5 changes: 3 additions & 2 deletions src/components/CreateIssue/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from "react";
import { useDispatch } from 'react-redux';
import { useDispatch } from "react-redux";
import {
Button,
Dialog,
Expand All @@ -15,6 +15,7 @@ import {
import CustomDropdown from "../CustomDropdown";
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
import {
componentOptions,
issueOptions,
labelOptions,
projectOptions,
Expand Down Expand Up @@ -131,7 +132,7 @@ const PopupScreen = ({ open, onClose }) => {
label="Components"
name="Components"
value={formData.Components}
options={labelOptions}
options={componentOptions}
onChange={handleChange}
width={"50%"}
/>
Expand Down
1 change: 1 addition & 0 deletions src/components/DashboardTop/DashboardTop.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ div.header-topic {
top: 10px;
left: 10px;
align-items: flex-start;
margin-left: 15px;
}

div.search-container {
Expand Down
Loading

0 comments on commit 4263c8a

Please sign in to comment.