Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ function TabEvidence({ caseId }) {
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))', gap: '1.5rem' }}>
{documents.map(doc => {
const dateStr = doc.uploadDate || doc.createdAt || new Date().toISOString();
const isValidDate = !isNaN(new Date(dateStr).getTime());
const isValidDate = !Number.isNaN(new Date(dateStr).getTime());

return (
<div key={doc.id} style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', flexWrap: 'wrap', gap: '1rem' }}>
<div>
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', marginBottom: '0.5rem' }}>
<h1 style={{ fontSize: '2rem', fontWeight: '800', color: 'var(--text-main)', margin: 0 }}>{caseData.title}</h1>

Check failure on line 248 in frontend/nyaysetu-frontend/src/pages/litigant/CaseDetailPage.jsx

View workflow job for this annotation

GitHub Actions / frontend-tests

src/pages/litigant/CaseDetailPage.test.jsx > CaseDetailPage timeline > loads timeline data from versioned timeline and case event endpoints

TypeError: Cannot read properties of null (reading 'title') ❯ CaseDetailPage src/pages/litigant/CaseDetailPage.jsx:248:129 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom.development.js:15486:18 ❯ mountIndeterminateComponent node_modules/react-dom/cjs/react-dom.development.js:20103:13 ❯ beginWork node_modules/react-dom/cjs/react-dom.development.js:21626:16 ❯ beginWork$1 node_modules/react-dom/cjs/react-dom.development.js:27465:14 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom.development.js:26599:12 ❯ workLoopSync node_modules/react-dom/cjs/react-dom.development.js:26505:5 ❯ renderRootSync node_modules/react-dom/cjs/react-dom.development.js:26473:7 ❯ recoverFromConcurrentError node_modules/react-dom/cjs/react-dom.development.js:25889:20 ❯ performConcurrentWorkOnRoot node_modules/react-dom/cjs/react-dom.development.js:25789:22
<span style={{ padding: '0.25rem 0.75rem', borderRadius: '9999px', background: statusStyle.bg, border: `1px solid ${statusStyle.border}`, color: statusStyle.text, fontSize: '0.75rem', fontWeight: '700' }}>
{caseData.status.replace(/_/g, ' ')}
</span>
Expand Down Expand Up @@ -1066,7 +1066,7 @@
<div style={{ display: 'grid', gap: '1rem' }}>
{files.map(doc => {
// Check if document has hash verification
const isVerified = doc.type === 'EVIDENCE' || verificationMap[doc.id] === true || !!doc.fileHash;
const isVerified = doc.type === 'EVIDENCE' || verificationMap[doc.id] || !!doc.fileHash;
const showCertificate = doc.type === 'EVIDENCE' || verificationMap[doc.id] === true || !!doc.fileHash;

return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/nyaysetu-frontend/src/utils/pwaHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const isPWAInstalled = () => {
return true;
}
// Check for iOS standalone mode
if (window.navigator.standalone === true) {
if (window.navigator.standalone ) {
return true;
}
// Check if launched from home screen
Expand Down
Loading