add default timestamps
This commit is contained in:
@@ -9,8 +9,12 @@ import "./index.css";
|
||||
export function App() {
|
||||
const [data, setData] = useState<ApiResponse>({ count: 0, plexts: [] });
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [timestampFrom, setTimestampFrom] = useState<Date | null>(null);
|
||||
const [timestampTo, setTimestampTo] = useState<Date | null>(null);
|
||||
const [timestampFrom, setTimestampFrom] = useState<Date | null>(() => {
|
||||
const eightHoursAgo = new Date();
|
||||
eightHoursAgo.setHours(eightHoursAgo.getHours() - 8);
|
||||
return eightHoursAgo;
|
||||
});
|
||||
const [timestampTo, setTimestampTo] = useState<Date | null>(() => new Date());
|
||||
const [playerName, setPlayerName] = useState<string>("all");
|
||||
const [limit, setLimit] = useState<number>(100);
|
||||
const [mapCenter, setMapCenter] = useState<[number, number]>([45.57, 12.36]);
|
||||
|
||||
Reference in New Issue
Block a user