Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
catdevnull committed Dec 2, 2024
1 parent f8072be commit a3a7e01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion sitio/src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const load: PageServerLoad = async ({ params, url, setHeaders }) => {
db.query.retweets.findFirst({
where: gte(
schema.retweets.retweetAt,
startingFrom.add(1, "month").toDate(),
startingFrom.add(1, "month").startOf("month").toDate(),
),
}),
]);
Expand Down
28 changes: 3 additions & 25 deletions sitio/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,16 @@
import {
calculateSessions,
formatDurationFromMs,
formatTinyDurationFromMs,
getInteractionTimes,
totalFromDurations,
} from "$lib/data-processing/screenTime";
import {
sortMost,
sortMostLiked,
sortMostRetweeted,
} from "$lib/data-processing/mostLiked";
import { goto } from "$app/navigation";
import {
dateFormatter,
dayjs,
likesCutoff,
longDateFormatter,
monthFormatter,
timeFormatter,
tz,
} from "$lib/consts";
import "core-js/es/array/to-reversed";
Expand All @@ -40,7 +33,7 @@
LinkIcon,
Repeat2,
} from "lucide-svelte";
import { CalendarDate, parseDate } from "@internationalized/date";
import { parseDate } from "@internationalized/date";
import StatsCalendar from "@/StatsCalendar.svelte";
import StatsCalendarNavigation from "@/StatsCalendarNavigation.svelte";
import timeCover from "$lib/assets/time-cover-milei.png";
Expand Down Expand Up @@ -84,21 +77,6 @@
);
$: totalTime = totalFromDurations(ranges);
$: masLikeados = sortMostLiked(filteredLikedTweets);
$: masRetweeteados = sortMostRetweeted(filteredRetweets);
const lastUpdatedFormatter = Intl.DateTimeFormat("es-AR", {
weekday: "short",
hour: "2-digit",
minute: "2-digit",
timeZone: tz,
});
const weekDayFormatter = Intl.DateTimeFormat("es-AR", {
day: "2-digit",
weekday: "short",
timeZone: tz,
});
function setQuery(query: string) {
goto(`/?q=${query}`);
}
Expand Down Expand Up @@ -251,7 +229,7 @@
{/if}

<section
class="mx-auto flex w-full max-w-2xl flex-col gap-4 bg-neutral-100 p-4 dark:bg-neutral-800 md:rounded-lg"
class="mx-auto flex w-full max-w-2xl flex-col gap-4 bg-neutral-100 p-4 md:rounded-lg dark:bg-neutral-800"
>
<h2 class=" my-2 text-center text-xl font-bold md:text-4xl">
Su actividad en {dayjs(data.start).isAfter(dayjs().startOf("month"))
Expand Down Expand Up @@ -333,7 +311,7 @@
Como lo viste en la prensa
</h2>
<div
class="mx-auto flex flex-col items-center justify-center gap-4 bg-neutral-100 p-2 dark:bg-neutral-800 md:mb-8 md:flex-row md:rounded-lg md:text-lg"
class="mx-auto flex flex-col items-center justify-center gap-4 bg-neutral-100 p-2 md:mb-8 md:flex-row md:rounded-lg md:text-lg dark:bg-neutral-800"
>
<img
class="w-[300px] rounded-lg"
Expand Down

0 comments on commit a3a7e01

Please sign in to comment.