Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onborda setup #71

Merged
merged 3 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/www/src/app/(dashboard)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { AddApiKeyButton } from "@/components/buttons/AddApiKeyButton";
import { AddChannelButton } from "@/components/buttons/AddChannelButton";
import { AddProjectButton } from "@/components/buttons/AddProjectButton";
import { AddPropertyButton } from "@/components/buttons/AddPropertyButton";
import { StartOnbordaButton } from "@/components/buttons/StartOnbordaButton";
import EventsDashboard from "@/components/dashboard/EventsDashboard";
import { DashboardHeader } from "@/components/dashboard/header";
import { DashboardShell } from "@/components/dashboard/shell";
Expand Down Expand Up @@ -133,6 +134,16 @@ export default async function DashboardPage() {
You need to generate an API key first
</EmptyPlaceholder.Description>
<AddApiKeyButton />
<div className="mt-4 space-y-4">
<StartOnbordaButton />

<div
id="onborda-step1"
className="flex items-center rounded-sm border border-border p-4 px-8"
>
This is the first step
</div>
</div>
</EmptyPlaceholder>
) : (
// Render EventsTable if there are Events
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/components/buttons/AddChannelButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useState } from "react";
import { useRouter } from "next/navigation";
import { createChannel } from "@/actions/create-channel";
import { toast } from "sonner";

import { Button } from "@dingify/ui/components/button";
import {
Expand All @@ -16,7 +17,6 @@ import {
} from "@dingify/ui/components/dialog";
import { Input } from "@dingify/ui/components/input";
import { Label } from "@dingify/ui/components/label";
import { toast } from "sonner";

export function AddChannelButton() {
const [channelName, setChannelName] = useState("");
Expand Down
19 changes: 19 additions & 0 deletions apps/www/src/components/buttons/StartOnbordaButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import { useEffect } from "react";
import { useOnborda } from "onborda";

import { Button } from "@dingify/ui/components/button";

export function StartOnbordaButton() {
const { startOnborda } = useOnborda();
const handleStartOnborda = () => {
startOnborda();
};

return (
<Button onClick={handleStartOnborda} variant="outline" size="lg">
Start Onborda πŸš€
</Button>
);
}
4 changes: 3 additions & 1 deletion apps/www/src/components/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export function Providers({ children, ...props }: ThemeProviderProps) {
<BalancerProvider>
<TooltipProvider delayDuration={0}>
<OnbordaProvider>
<Onborda steps={steps}>{children}</Onborda>
<Onborda steps={steps} showOnborda={true}>
{children}
</Onborda>
</OnbordaProvider>
</TooltipProvider>
</BalancerProvider>
Expand Down
19 changes: 19 additions & 0 deletions pnpm-lock.yaml

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