feat(marketing-pages): add ui/query + barrel + feature test
This commit is contained in:
@@ -1 +1,4 @@
|
||||
export {};
|
||||
export type { Page, PageStatus, Hero } from "./entities/page";
|
||||
export type { SiteSettings } from "./entities/site-settings";
|
||||
export { PageNotFoundError, InputParseError } from "./entities/errors";
|
||||
export { pageBySlugQuery, siteSettingsQuery } from "./ui/query";
|
||||
|
||||
14
packages/marketing-pages/src/ui/query.ts
Normal file
14
packages/marketing-pages/src/ui/query.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
type TrpcClient = {
|
||||
marketingPages: {
|
||||
pageBySlug: { queryOptions: (input: { slug: string }) => unknown };
|
||||
siteSettings: { queryOptions: () => unknown };
|
||||
};
|
||||
};
|
||||
|
||||
export function pageBySlugQuery(client: TrpcClient, slug: string) {
|
||||
return client.marketingPages.pageBySlug.queryOptions({ slug });
|
||||
}
|
||||
|
||||
export function siteSettingsQuery(client: TrpcClient) {
|
||||
return client.marketingPages.siteSettings.queryOptions();
|
||||
}
|
||||
Reference in New Issue
Block a user