Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: DEBUG_SLOW_MO
  • Loading branch information
hi-ogawa committed Apr 7, 2024
commit a91ad55789e3aa46bac8ec8051056d425e7bae28
2 changes: 1 addition & 1 deletion src/routes/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function GlobalPendingOverlay() {
<div
style={{
pointerEvents: "none",
opacity: isPending ? 0.3 : 0,
opacity: isPending ? 0.5 : 0,
transition: "opacity 200ms",
transitionDelay: "200ms",
background: "#fff",
Expand Down
6 changes: 5 additions & 1 deletion src/routes/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export const fakeContacts = {
////////////////////////////////////////////////////////////////////////////////
// Handful of helper functions to be called from route loaders and actions
export async function getContacts(query?: string | null) {
// await new Promise((resolve) => setTimeout(resolve, 500));
const slowMo = globalThis.process?.env["DEBUG_SLOW_MO"];
if (slowMo) {
await new Promise((resolve) => setTimeout(resolve, Number(slowMo)));
}

let contacts = await fakeContacts.getAll();
if (query) {
const q = query.toLowerCase();
Expand Down