Skip to content

Commit

Permalink
Empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Feb 3, 2025
1 parent 61343ff commit fb0a2e0
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Activity } from "@/components/activity";
import { ActivitySkeleton } from "@/components/activity";
import { FilterLocales } from "@/components/filter-locales";
import { OnboardingSteps } from "@/components/onboarding-steps";
import { SearchInput } from "@/components/search-input";
import { HydrateClient, trpc } from "@/trpc/server";
import { getTranslations } from "next-intl/server";
Expand Down Expand Up @@ -40,6 +41,22 @@ export default async function Page({
limit: PAGE_LIMIT,
});

const translations = await trpc.translate.getTranslationsBySlug({
slug: project,
organizationId: organization,
search: q ?? null,
locales: locales?.split(",") ?? null,
});

if (!translations.length && !q) {
const data = await trpc.project.getBySlug({
slug: project,
organizationId: organization,
});

return <OnboardingSteps projectId={data?.id} />;
}

return (
<HydrateClient>
<div className="p-4 pt-8 md:p-8">
Expand Down

0 comments on commit fb0a2e0

Please sign in to comment.