fix(chart): duplicate keys of xaxis
This commit is contained in:
@@ -315,7 +315,7 @@ export default function DomainList({ user, action }: DomainListProps) {
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<EmptyPlaceholder>
|
||||
<EmptyPlaceholder className="shadow-none">
|
||||
<EmptyPlaceholder.Icon name="globeLock" />
|
||||
<EmptyPlaceholder.Title>No Domains</EmptyPlaceholder.Title>
|
||||
<EmptyPlaceholder.Description>
|
||||
|
||||
@@ -271,7 +271,7 @@ export default function UsersList({ user }: UrlListProps) {
|
||||
</TableRow>
|
||||
))
|
||||
) : (
|
||||
<EmptyPlaceholder>
|
||||
<EmptyPlaceholder className="shadow-none">
|
||||
<EmptyPlaceholder.Icon name="users" />
|
||||
<EmptyPlaceholder.Title>No users</EmptyPlaceholder.Title>
|
||||
<EmptyPlaceholder.Description>
|
||||
|
||||
@@ -316,7 +316,7 @@ export default function UserRecordsList({ user, action }: RecordListProps) {
|
||||
</TableRow>
|
||||
))
|
||||
) : (
|
||||
<EmptyPlaceholder>
|
||||
<EmptyPlaceholder className="shadow-none">
|
||||
<EmptyPlaceholder.Icon name="globe" />
|
||||
<EmptyPlaceholder.Title>No Subdomain</EmptyPlaceholder.Title>
|
||||
<EmptyPlaceholder.Description>
|
||||
|
||||
@@ -2,18 +2,7 @@
|
||||
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import {
|
||||
addHours,
|
||||
addMinutes,
|
||||
differenceInDays,
|
||||
differenceInHours,
|
||||
differenceInMinutes,
|
||||
format,
|
||||
startOfDay,
|
||||
startOfHour,
|
||||
startOfMinute,
|
||||
} from "date-fns";
|
||||
import { create } from "lodash";
|
||||
import { differenceInMinutes, format } from "date-fns";
|
||||
|
||||
import { DAILY_DIMENSION_ENUMS } from "@/lib/enums";
|
||||
import {
|
||||
@@ -149,7 +138,7 @@ export default function Realtime({ isAdmin = false }: { isAdmin?: boolean }) {
|
||||
return Array.from(groupedData.entries())
|
||||
.sort(([a], [b]) => parseInt(a) - parseInt(b))
|
||||
.map(([key, count]) => ({
|
||||
time: format(new Date(parseInt(key)), "HH:mm"),
|
||||
time: format(new Date(parseInt(key)), "MM-dd HH:mm"),
|
||||
count: count,
|
||||
}));
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ export const RealtimeChart = ({
|
||||
type="category"
|
||||
scale="point"
|
||||
padding={{ left: 14, right: 20 }}
|
||||
tickFormatter={(value) => value}
|
||||
tickFormatter={(value) => value.split(" ")[1]}
|
||||
/>
|
||||
<YAxis
|
||||
domain={[0, "dataMax"]}
|
||||
|
||||
@@ -182,7 +182,7 @@ export default function UserUrlsList({ user, action }: UrlListProps) {
|
||||
};
|
||||
|
||||
const rendeEmpty = () => (
|
||||
<EmptyPlaceholder className="col-span-full">
|
||||
<EmptyPlaceholder className="col-span-full shadow-none">
|
||||
<EmptyPlaceholder.Icon name="link" />
|
||||
<EmptyPlaceholder.Title>No urls</EmptyPlaceholder.Title>
|
||||
<EmptyPlaceholder.Description>
|
||||
@@ -479,8 +479,8 @@ export default function UserUrlsList({ user, action }: UrlListProps) {
|
||||
<BlurImage
|
||||
src={`https://unavatar.io/${extractHostname(short.target)}?fallback=https://wr.do/logo.png`}
|
||||
alt="logo"
|
||||
width={35}
|
||||
height={35}
|
||||
width={30}
|
||||
height={30}
|
||||
/>
|
||||
<div className="ml-2 mr-auto flex flex-col justify-between truncate">
|
||||
{/* url */}
|
||||
|
||||
@@ -418,7 +418,7 @@ export default function EmailSidebar({
|
||||
<>
|
||||
{!isCollapsed ? (
|
||||
<div className="flex h-full items-center justify-center">
|
||||
<EmptyPlaceholder>
|
||||
<EmptyPlaceholder className="shadow-none">
|
||||
<EmptyPlaceholder.Icon name="mailPlus" />
|
||||
<EmptyPlaceholder.Title>No emails</EmptyPlaceholder.Title>
|
||||
<EmptyPlaceholder.Description>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user