Skip to content

Commit 13ce909

Browse files
committed
feat: improve plugin API
1 parent f1361a2 commit 13ce909

23 files changed

+1737
-596
lines changed

demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@emotion/styled": "11",
1616
"@ngneat/falso": "5.3.0",
1717
"framer-motion": "6",
18-
"keat": "0.8.5",
18+
"keat": "file:../..",
1919
"next": "12.1.6",
2020
"react": "18.1.0",
2121
"react-dom": "18.1.0",

demo/pages/demo/audiences.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ import {
1515
VStack,
1616
} from "@chakra-ui/react";
1717
import { randEmail } from "@ngneat/falso";
18-
import { audiences, keatReact } from "keat";
18+
import { audience, keatReact } from "keat";
1919
import { NextPage } from "next";
2020
import { useMemo, useState } from "react";
2121
import NavBar from "../../components/NavBar";
2222

2323
export const { useKeat } = keatReact({
24-
plugins: [
25-
audiences({
26-
staff: (user) => user?.email.endsWith("@example.io"),
27-
}),
28-
],
24+
plugins: [audience("staff", (user) => user?.email.endsWith("@example.io"))],
2925
features: { demo: "staff" },
3026
});
3127

0 commit comments

Comments
 (0)