diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-13 13:50:25 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-13 13:50:25 -0800 |
| commit | e014ded82a630bd91b15be4307125f5580119f4d (patch) | |
| tree | 416712eef67ba5cac1c3e55780b80ab04c9aec47 /frontend/coverage/src/App.tsx.html | |
| parent | e7f0e40b3563a56a06f5bedd3efd40b750e74521 (diff) | |
| download | neko-e014ded82a630bd91b15be4307125f5580119f4d.tar.gz neko-e014ded82a630bd91b15be4307125f5580119f4d.tar.bz2 neko-e014ded82a630bd91b15be4307125f5580119f4d.zip | |
Analyze page size and fix frontend tests
Diffstat (limited to 'frontend/coverage/src/App.tsx.html')
| -rw-r--r-- | frontend/coverage/src/App.tsx.html | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/frontend/coverage/src/App.tsx.html b/frontend/coverage/src/App.tsx.html index 956b16a..0d5195d 100644 --- a/frontend/coverage/src/App.tsx.html +++ b/frontend/coverage/src/App.tsx.html @@ -23,9 +23,9 @@ <div class='clearfix'> <div class='fl pad1y space-right2'> - <span class="strong">73.68% </span> + <span class="strong">78.94% </span> <span class="quiet">Statements</span> - <span class='fraction'>14/19</span> + <span class='fraction'>15/19</span> </div> @@ -44,9 +44,9 @@ <div class='fl pad1y space-right2'> - <span class="strong">73.68% </span> + <span class="strong">78.94% </span> <span class="quiet">Lines</span> - <span class='fraction'>14/19</span> + <span class='fraction'>15/19</span> </div> @@ -153,13 +153,7 @@ <a name='L88'></a><a href='#L88'>88</a> <a name='L89'></a><a href='#L89'>89</a> <a name='L90'></a><a href='#L90'>90</a> -<a name='L91'></a><a href='#L91'>91</a> -<a name='L92'></a><a href='#L92'>92</a> -<a name='L93'></a><a href='#L93'>93</a> -<a name='L94'></a><a href='#L94'>94</a> -<a name='L95'></a><a href='#L95'>95</a> -<a name='L96'></a><a href='#L96'>96</a> -<a name='L97'></a><a href='#L97'>97</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span> +<a name='L91'></a><a href='#L91'>91</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> @@ -198,21 +192,14 @@ <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-yes">1x</span> +<span class="cline-any cline-yes">1x</span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-no"> </span> <span class="cline-any cline-no"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> -<span class="cline-any cline-neutral"> </span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-neutral"> </span> @@ -237,6 +224,7 @@ <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> <span class="cline-any cline-yes">2x</span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> @@ -256,7 +244,7 @@ <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span> <span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useEffect, useState } from 'react'; -import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom'; +import { BrowserRouter, Routes, Route, Navigate, useLocation, useNavigate } from 'react-router-dom'; import Login from './components/Login'; import './App.css'; @@ -293,24 +281,17 @@ import FeedItems from './components/FeedItems'; import Settings from './components/Settings'; function Dashboard() { + const navigate = useNavigate(); return ( <div className="dashboard"> <header className="dashboard-header"> <h1>Neko Reader</h1> <nav> - <a href="/settings" onClick={<span class="fstat-no" title="function not covered" >(e</span>) => { -<span class="cstat-no" title="statement not covered" > e.preventDefault();</span> -<span class="cstat-no" title="statement not covered" > window.history.pushState({}, '', '/settings');</span> - // Quick hack for navigation without full router link if inside Router context, - // but here we are inside BrowserRouter so we should use Link or just simple navigation - // actually let's just use a real Link if we can, but we need import. - // For now, let's just rely on the Router catching the URL change if we use proper Link - // or just a button that navigates. - }} style={{ color: 'white', marginRight: '1rem' }}>Settings</a> + <button onClick={<span class="fstat-no" title="function not covered" >() => <span class="cstat-no" title="statement not covered" >n</span>avigate('/settings')} c</span>lassName="nav-link" style={{ color: 'white', marginRight: '1rem', background: 'none', border: 'none', cursor: 'pointer', fontSize: 'inherit', fontFamily: 'inherit' }}>Settings</button> <button onClick={() => { fetch('/api/logout', { method: 'POST' }) - .then(() => window.location.href = '/login/'); + .then(() => window.location.href = '/v2/login'); }} className="logout-btn"> Logout </button> @@ -323,8 +304,9 @@ function Dashboard() { <main className="dashboard-main"> <Routes> <Route path="/feed/:feedId" element={<FeedItems />} /> + <Route path="/tag/:tagName" element={<FeedItems />} /> <Route path="/settings" element={<Settings />} /> - <Route path="/" element={<p>Select a feed to view items.</p>} /> + <Route path="/" element={<FeedItems />} /> </Routes> </main> </div> @@ -358,7 +340,7 @@ export default App; <div class='footer quiet pad2 space-top1 center small'> Code coverage generated by <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> - at 2026-02-13T15:03:42.999Z + at 2026-02-13T21:49:58.924Z </div> <script src="../prettify.js"></script> <script> |
