Remove dead normalizeIssue function and make legal pages linkable
All checks were successful
Build & Push Container Image / build (push) Successful in 8s
All checks were successful
Build & Push Container Image / build (push) Successful in 8s
- Remove unused normalizeIssue and JIRA_STORY_POINTS_FIELD env var - Add URL routing for /terms, /privacy, /support pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
620547c78c
commit
047d0de485
3 changed files with 10 additions and 16 deletions
|
|
@ -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 <LegalPage page={page} dark={dark} onBack={() => setView(prevView)} />;
|
||||
return <LegalPage page={page} dark={dark} onBack={() => {
|
||||
window.history.replaceState({}, '', '/');
|
||||
setView(prevView);
|
||||
}} />;
|
||||
}
|
||||
|
||||
if (view === 'login') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue