feat(marketing-pages): add ui/query + barrel + feature test
This commit is contained in:
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