Skip to content

Commit

Permalink
Update mutate.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Jan 5, 2025
1 parent f78f10b commit a3590e9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/web/lib/swr/mutate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mutate } from "swr";

export const mutatePrefix = async (prefix: string | string[]) => {
await mutate(
export const mutatePrefix = (prefix: string | string[]) =>
mutate(
(key) =>
typeof key === "string" &&
(Array.isArray(prefix)
Expand All @@ -10,10 +10,9 @@ export const mutatePrefix = async (prefix: string | string[]) => {
undefined,
{ revalidate: true },
);
};

export const mutateSuffix = async (suffix: string | string[]) => {
await mutate(
export const mutateSuffix = (suffix: string | string[]) =>
mutate(
(key) =>
typeof key === "string" &&
(Array.isArray(suffix)
Expand All @@ -24,4 +23,3 @@ export const mutateSuffix = async (suffix: string | string[]) => {
revalidate: true,
},
);
};

0 comments on commit a3590e9

Please sign in to comment.