mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Fix: use locale string for change request time badge. (#10651)
Uses the user's preferred date / time formatting for the scheduled at time in CR schedule badges. Before (en-US formatting): <img width="291" height="58" alt="image" src="https://github.com/user-attachments/assets/edb04292-4678-4bfd-93a1-8fd2a3f01a1f" /> After (ja formatting): <img width="308" height="106" alt="image" src="https://github.com/user-attachments/assets/9828355f-0c23-4b8f-bef3-a0173e92c306" />
This commit is contained in:
		
							parent
							
								
									74f7a3bb85
								
							
						
					
					
						commit
						d3e7e67b91
					
				@ -8,6 +8,7 @@ import Close from '@mui/icons-material/Close';
 | 
			
		||||
import ErrorIcon from '@mui/icons-material/Error';
 | 
			
		||||
import PauseCircle from '@mui/icons-material/PauseCircle';
 | 
			
		||||
import { HtmlTooltip } from 'component/common/HtmlTooltip/HtmlTooltip';
 | 
			
		||||
import { useLocationSettings } from 'hooks/useLocationSettings';
 | 
			
		||||
 | 
			
		||||
interface IChangeRequestStatusBadgeProps {
 | 
			
		||||
    changeRequest: ChangeRequestType | undefined;
 | 
			
		||||
@ -59,7 +60,10 @@ export const ChangeRequestStatusBadge: VFC<IChangeRequestStatusBadgeProps> = ({
 | 
			
		||||
            );
 | 
			
		||||
        case 'Scheduled': {
 | 
			
		||||
            const { schedule } = changeRequest;
 | 
			
		||||
            const scheduledAt = new Date(schedule.scheduledAt).toLocaleString();
 | 
			
		||||
            const { locationSettings } = useLocationSettings();
 | 
			
		||||
            const scheduledAt = new Date(schedule.scheduledAt).toLocaleString(
 | 
			
		||||
                locationSettings.locale,
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
            const { color, icon, tooltipTitle } = (() => {
 | 
			
		||||
                switch (schedule.status) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user