Skip to content

Commit

Permalink
Merge pull request #10 from XionWCFM/pages
Browse files Browse the repository at this point in the history
[2024.08.14] 0.0.5 version release | turbo 2.0.11 -> 2.0.12
  • Loading branch information
XionWCFM authored Aug 14, 2024
2 parents cc674a5 + 1556079 commit 76ded80
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 37 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ Using createStep, you can create, delete, or update the query string for the nex

it doesn't depend on React, you can create the necessary steps anywhere as long as you have funnelOptions.

Since it can be used on servers without any problems, you can create a route to the funnel anywhere.

### FunnelClient.createStep

```tsx
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"eslint": "^8.57.0",
"lefthook": "^1.7.11",
"prettier": "^3.2.5",
"turbo": "^2.0.11",
"turbo": "^2.0.12",
"vitest": "^2.0.5"
},
"packageManager": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/funnel-app-router-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xionhub/funnel-app-router-adapter",
"version": "0.0.4",
"version": "0.0.5",
"private": false,
"license": "MIT",
"main": "./dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import { useSearchParams } from "next/navigation";
export const useFunnelAppRouterAdapter = <Steps extends NonEmptyArray<string>>(
options: Omit<FunnelOptions<Steps>, "step">,
) => {
const funnelId = options.funnelId;
const searchParams = useSearchParams();
const queryStep = searchParams.get(funnelId);
const funnelClient = new FunnelClient(options);
const step = (queryStep ?? undefined) as Steps[number] | undefined;
const step = (searchParams.get(options.funnelId) ?? undefined) as Steps[number] | undefined;
const [Funnel, { onStepChange, ...controller }] = useCoreFunnel({ ...options, step });
return [Funnel, { ...controller, createStep: funnelClient.createStep }] as const;
};
1 change: 1 addition & 0 deletions packages/funnel-app-router-adapter/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export default defineConfig({
dts: true,
clean: true,
treeshake: true,
minify: true,
});
2 changes: 1 addition & 1 deletion packages/funnel-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xionhub/funnel-client",
"version": "0.0.4",
"version": "0.0.5",
"private": false,
"license": "MIT",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/funnel-client/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export default defineConfig({
dts: true,
clean: true,
treeshake: true,
minify: true,
});
2 changes: 1 addition & 1 deletion packages/funnel-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xionhub/funnel-core",
"version": "0.0.4",
"version": "0.0.5",
"private": false,
"license": "MIT",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/funnel-core/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export default defineConfig({
dts: true,
clean: true,
treeshake: true,
minify: true,
});
2 changes: 1 addition & 1 deletion packages/funnel-pages-router-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xionhub/funnel-pages-router-adapter",
"version": "0.0.4",
"version": "0.0.5",
"private": false,
"license": "MIT",
"main": "./dist/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/funnel-pages-router-adapter/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export default defineConfig({
dts: true,
clean: true,
treeshake: true,
minify: true,
});
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 76ded80

Please sign in to comment.