Refactor: Remove unused status class mapping and use Next.js Link

This commit is contained in:
Daniel Alves Rösel
2026-04-02 22:17:06 +04:00
committed by GitHub
2 changed files with 3 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import CVTree from '@/components/cv/CVTree'; import CVTree from '@/components/cv/CVTree';
import DiffViewer from '@/components/cv/DiffViewer'; import DiffViewer from '@/components/cv/DiffViewer';
import Link from 'next/link';
import { import {
createBranch, createSubmission, Document, downloadVersionUrl, createBranch, createSubmission, Document, downloadVersionUrl,
fetchDocuments, publishVersion, uploadDocument, Version, fetchDocuments, publishVersion, uploadDocument, Version,
@@ -218,9 +219,9 @@ export default function Dashboard() {
<div style={{ display: 'flex', flexDirection: 'column', height: '100vh', overflow: 'hidden', background: 'var(--bg)' }}> <div style={{ display: 'flex', flexDirection: 'column', height: '100vh', overflow: 'hidden', background: 'var(--bg)' }}>
{/* top bar */} {/* top bar */}
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '0 16px', height: 44, borderBottom: '1px solid var(--border)', flexShrink: 0 }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '0 16px', height: 44, borderBottom: '1px solid var(--border)', flexShrink: 0 }}>
<a href="/" style={{ fontSize: 13, fontWeight: 600, color: 'var(--text)', textDecoration: 'none' }}> <Link href="/" style={{ fontSize: 13, fontWeight: 600, color: 'var(--text)', textDecoration: 'none' }}>
Resume Branches Resume Branches
</a> </Link>
<button className="btn btn-primary" style={{ padding: '4px 10px', fontSize: 12 }} onClick={() => setModal('upload')}> <button className="btn btn-primary" style={{ padding: '4px 10px', fontSize: 12 }} onClick={() => setModal('upload')}>
+ Upload CV + Upload CV
</button> </button>

View File

@@ -15,12 +15,6 @@ function buildTree(versions: Version[]): TreeNode | null {
return root; return root;
} }
const STATUS_CLASS: Record<string, string> = {
draft: 'badge badge-draft', submitted: 'badge badge-submitted',
interviewing: 'badge badge-interviewing', offer: 'badge badge-offer',
rejected: 'badge badge-rejected', closed: 'badge badge-closed',
};
function Node({ node, depth, selectedId, onSelect }: { function Node({ node, depth, selectedId, onSelect }: {
node: TreeNode; depth: number; selectedId: string | null; onSelect: (id: string) => void; node: TreeNode; depth: number; selectedId: string | null; onSelect: (id: string) => void;
}) { }) {