diff --git a/searching-front/app/core/pages/State/State.tsx b/searching-front/app/core/pages/State/State.tsx index 47be1a9..04dd76c 100644 --- a/searching-front/app/core/pages/State/State.tsx +++ b/searching-front/app/core/pages/State/State.tsx @@ -89,6 +89,7 @@ const State = ({ historyOfState: historyOfStatePreloaded, lastWeekNewSites, }: StatePageProps) => { + const nowDate = format(new Date(),'d MMMM').toLowerCase(); const [historyPeriod, setHistoryPeriod] = useState(InfluxPeriod.D) const { t } = useTranslation() const [historyOfState] = useQuery(getHistoryOfSitesState, historyPeriod, { @@ -105,7 +106,7 @@ const State = ({ / {actualState.allDomainsCount}
{t("state.areNowAvailable")}
-
9 september
+
{nowDate}
diff --git a/searching-front/app/stateSites/queries/getLastWeekNewSites.ts b/searching-front/app/stateSites/queries/getLastWeekNewSites.ts index 2695b2f..eb85a67 100644 --- a/searching-front/app/stateSites/queries/getLastWeekNewSites.ts +++ b/searching-front/app/stateSites/queries/getLastWeekNewSites.ts @@ -2,14 +2,12 @@ import { subDays } from "date-fns" import db from "db" export default async function getLastWeekNewSites() { - const weekAgo = subDays(new Date(), 7) - const lastWeekNewSites = await db.nftDomain.findMany({ orderBy: { firstAvailableDate: "desc" }, take: 10, - where: { available: true, AND: { firstAvailableDate: { gt: weekAgo } } }, + where: { available: true }, }) - console.log(lastWeekNewSites) + return { lastWeekNewSites, }