diff --git a/backend/.env.example b/backend/.env.example index a045767..3f95bff 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -8,5 +8,4 @@ JIRA_CLIENT_SECRET= JIRA_OAUTH_REDIRECT_URI=http://localhost:4010/api/jira/oauth/callback JIRA_SCOPES="offline_access read:jira-work write:jira-work read:me" JWT_SECRET=change-me-to-a-random-secret -JIRA_STORY_POINTS_FIELD=customfield_10016 JIRA_MOCK_FALLBACK=true diff --git a/backend/src/services/jiraService.js b/backend/src/services/jiraService.js index 41ac5a0..c6f4639 100644 --- a/backend/src/services/jiraService.js +++ b/backend/src/services/jiraService.js @@ -193,20 +193,8 @@ async function jiraFetch(jiraAccountId, path, options = {}) { return response.json(); } -function normalizeIssue(issue) { - return { - id: issue.id, - key: issue.key, - title: issue.fields?.summary || issue.key, - description: issue.fields?.description || null, - estimate: issue.fields?.[process.env.JIRA_STORY_POINTS_FIELD || 'customfield_10016'] || 0, - status: issue.fields?.status?.name || 'Unknown', - reporter: issue.fields?.reporter?.displayName || null - }; -} - export async function getSprintIssues(jiraAccountId, sprintId, boardId) { - let spField = process.env.JIRA_STORY_POINTS_FIELD || 'customfield_10016'; + let spField = 'customfield_10016'; if (boardId) { try { const config = await jiraFetch(jiraAccountId, `/rest/agile/1.0/board/${boardId}/configuration`); diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 3449648..a273b09 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -21,7 +21,10 @@ function useDarkMode() { } export default function App() { - const [view, setView] = useState('loading'); + const [view, setView] = useState(() => { + const legalPages = { '/terms': 'legal-terms', '/privacy': 'legal-privacy', '/support': 'legal-support' }; + return legalPages[window.location.pathname] || 'loading'; + }); const [user, setUser] = useState(null); const [activeRoom, setActiveRoom] = useState(null); const [prevView, setPrevView] = useState('login'); @@ -92,12 +95,16 @@ export default function App() { function showLegal(page) { setPrevView(view); + window.history.pushState({}, '', `/${page}`); setView(`legal-${page}`); } if (view.startsWith('legal-')) { const page = view.replace('legal-', ''); - return setView(prevView)} />; + return { + window.history.replaceState({}, '', '/'); + setView(prevView); + }} />; } if (view === 'login') {