Skip to content

Commit 839d7b5

Browse files
skeptrunedevcdxker
authored andcommitted
cleanup(shopify): change save to next and never disable it during onboarding
1 parent a9fcae3 commit 839d7b5

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

clients/trieve-shopify-extension/app/components/onboarding/Onboarding.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ export const Onboarding = () => {
4545
"flex w-full justify-between items-center p-1 px-2",
4646
)}
4747
>
48-
<div className="flex gap-2">
48+
<div className="flex gap-2 items-center">
4949
<div
5050
className={cn(
51-
"transition-colors duration-100",
51+
"transition-colors duration-100 text-base",
5252
isCurrent ? "text-black" : "text-neutral-500",
5353
)}
5454
>

clients/trieve-shopify-extension/app/components/onboarding/SetPromptsOnboarding.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { withSuspense } from "app/utils/suspense";
1313
import { trackCustomerEvent } from "app/processors/shopifyTrackers";
1414

1515
export const SetPromptsOnboarding: OnboardingBody = withSuspense(
16-
({ broadcastCompletion }) => {
16+
({ broadcastCompletion, goToNextStep }) => {
1717
const { trieve, organization, trieveKey } = useTrieve();
1818
// this info is already preloaded in root loader
1919
const { data: shopDataset, refetch } = useSuspenseQuery(
@@ -34,6 +34,10 @@ export const SetPromptsOnboarding: OnboardingBody = withSuspense(
3434
organization.organization.id,
3535
trieveKey.key,
3636
);
37+
38+
if (goToNextStep) {
39+
goToNextStep();
40+
}
3741
};
3842

3943
const [datasetSettings, setDatasetSettings] = useState<DatasetConfig>(
@@ -127,13 +131,8 @@ export const SetPromptsOnboarding: OnboardingBody = withSuspense(
127131
autoComplete="off"
128132
/>
129133
<div className="flex w-full pt-3 justify-end">
130-
<Button
131-
submit
132-
disabled={
133-
!hasChangedFromPageLoad || saveSettingsMutation.isPending
134-
}
135-
>
136-
Save
134+
<Button submit disabled={saveSettingsMutation.isPending}>
135+
{hasChangedFromPageLoad ? "Save" : "Next"}
137136
</Button>
138137
</div>
139138
</form>

0 commit comments

Comments
 (0)