feat(11-02): add useReorderCandidates hook, candidateViewMode, and CandidateListItem component
- Add useReorderCandidates mutation hook with apiPatch to /candidates/reorder endpoint - Add candidateViewMode (list|grid) state and setCandidateViewMode to uiStore - Create CandidateListItem component with drag handle, rank badge, horizontal layout - Export RankBadge helper (gold/silver/bronze medal icons for top 3) - Add style prop support to LucideIcon component - Add pros/cons fields to CandidateWithCategory in useThreads.ts
This commit is contained in:
@@ -48,6 +48,10 @@ interface UIState {
|
||||
externalLinkUrl: string | null;
|
||||
openExternalLink: (url: string) => void;
|
||||
closeExternalLink: () => void;
|
||||
|
||||
// Candidate view mode
|
||||
candidateViewMode: "list" | "grid";
|
||||
setCandidateViewMode: (mode: "list" | "grid") => void;
|
||||
}
|
||||
|
||||
export const useUIStore = create<UIState>((set) => ({
|
||||
@@ -103,4 +107,8 @@ export const useUIStore = create<UIState>((set) => ({
|
||||
externalLinkUrl: null,
|
||||
openExternalLink: (url) => set({ externalLinkUrl: url }),
|
||||
closeExternalLink: () => set({ externalLinkUrl: null }),
|
||||
|
||||
// Candidate view mode
|
||||
candidateViewMode: "list",
|
||||
setCandidateViewMode: (mode) => set({ candidateViewMode: mode }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user