stage 1 of oauth removal, switch to sanctum pat tokens

This commit is contained in:
Codex Agent
2025-11-06 20:35:58 +01:00
parent c9783bd57b
commit 776da57ca9
47 changed files with 1571 additions and 2555 deletions

View File

@@ -1,8 +1,15 @@
import { useCallback } from 'react';
export function useInitials() {
return useCallback((fullName: string): string => {
const names = fullName.trim().split(' ');
return useCallback((fullName?: string | null): string => {
if (!fullName) {
return '';
}
const names = fullName
.trim()
.split(/\s+/u)
.filter((segment) => segment.length > 0);
if (names.length === 0) return '';
if (names.length === 1) return names[0].charAt(0).toUpperCase();