Fix jwt-token
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import { useSocket } from '../contexts/SocketContext';
|
||||
import MovementAlertsPanel from '../components/MovementAlertsPanel';
|
||||
import api from '../services/api';
|
||||
import { formatFrequency } from '../utils/formatFrequency';
|
||||
import { t } from '../utils/tempTranslations'; // Temporary translation system
|
||||
import {
|
||||
ServerIcon,
|
||||
@@ -319,7 +320,7 @@ const Dashboard = () => {
|
||||
<p className="text-xs text-gray-500">
|
||||
{detection.device.name || `Device ${detection.device_id}`} •
|
||||
RSSI: {detection.rssi}dBm •
|
||||
Freq: {detection.freq}MHz
|
||||
Freq: {formatFrequency(detection.freq)}
|
||||
</p>
|
||||
<p className="text-xs text-gray-500">
|
||||
{format(new Date(detection.server_timestamp), 'HH:mm:ss')}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import api from '../services/api';
|
||||
import { format } from 'date-fns';
|
||||
import { formatFrequency } from '../utils/formatFrequency';
|
||||
import {
|
||||
BugAntIcon,
|
||||
ExclamationTriangleIcon,
|
||||
@@ -320,7 +321,7 @@ const Debug = () => {
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
<div className="text-sm text-gray-900">{detection.rssi} dBm</div>
|
||||
<div className="text-sm text-gray-500">{detection.freq} MHz</div>
|
||||
<div className="text-sm text-gray-500">{formatFrequency(detection.freq)}</div>
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
{detection.threat_level ? (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import api from '../services/api';
|
||||
import { format } from 'date-fns';
|
||||
import { formatFrequency } from '../utils/formatFrequency';
|
||||
import { t } from '../utils/tempTranslations'; // Temporary translation system
|
||||
import {
|
||||
MagnifyingGlassIcon,
|
||||
@@ -214,7 +215,7 @@ const Detections = () => {
|
||||
</td>
|
||||
<td>
|
||||
<span className="text-sm text-gray-900">
|
||||
{detection.freq} MHz
|
||||
{formatFrequency(detection.freq)}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -6,6 +6,7 @@ import L from 'leaflet'; // For divIcon and other Leaflet utilities
|
||||
import { useSocket } from '../contexts/SocketContext';
|
||||
import api from '../services/api';
|
||||
import { format } from 'date-fns';
|
||||
import { formatFrequency } from '../utils/formatFrequency';
|
||||
import { t } from '../utils/tempTranslations';
|
||||
import {
|
||||
ServerIcon,
|
||||
@@ -742,7 +743,7 @@ const DevicePopup = ({ device, status, detections }) => (
|
||||
</div>
|
||||
{detections.slice(0, 3).map((detection, index) => (
|
||||
<div key={index} className="text-xs text-gray-600">
|
||||
Drone {detection.drone_id} • {detection.freq}MHz • {detection.rssi}dBm
|
||||
Drone {detection.drone_id} • {formatFrequency(detection.freq)} • {detection.rssi}dBm
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -833,7 +834,7 @@ const DroneDetectionPopup = ({ detection, age, droneTypes, droneDetectionHistory
|
||||
</div>
|
||||
<div>
|
||||
<span className="font-medium text-gray-700">{t('map.frequency')}:</span>
|
||||
<div className="text-gray-900">{detection.freq}MHz</div>
|
||||
<div className="text-gray-900">{formatFrequency(detection.freq)}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user