Skip to content
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
18 changes: 5 additions & 13 deletions apps/webapp/app/components/CreateNewWorkflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,14 @@ export function CreateNewWorkflowNoWorkflows() {
<Body className="mb-4">
Easily authenticate with APIs using the supported integrations
below. If there's an integration we don't yet support,{" "}
<script src="//embed.typeform.com/next/embed.js"></script>
<button
data-tf-popup="VwblgGDZ"
data-tf-opacity="100"
data-tf-size="100"
data-tf-iframe-props="title=Request an integration"
data-tf-auto-close="2000"
data-tf-transitive-search-params
data-tf-medium="snippet"
className="underline opacity-80 hover:opacity-100 transition underline-offset-2"
<a
href="mailto:hello@trigger.dev"
className="text-slate-300 underline"
>
vote for it here
</button>{" "}
let us know
</a>{" "}
and we'll add it.
</Body>
<script src="//embed.typeform.com/next/embed.js"></script>
<div className="flex gap-2 items-center mb-8">
{getProviders(false).map((provider) => (
<ApiLogoIcon
Expand Down
16 changes: 8 additions & 8 deletions apps/webapp/app/hooks/useOrganizations.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type {
getOrganizationFromSlug,
Organization,
} from "~/models/organization.server";
import type { PrismaReturnType } from "~/utils";
import type { UseDataFunctionReturn } from "remix-typedjson";
import type { loader as appLoader } from "~/routes/__app";
import type { loader as orgLoader } from "~/routes/__app/orgs/$organizationSlug";
import { hydrateObject, useMatchesData } from "~/utils";

export function useOrganizations(): Organization[] | undefined {
export function useOrganizations() {
const routeMatch = useMatchesData("routes/__app");

if (!routeMatch || !routeMatch.data.organizations) {
return undefined;
}
return hydrateObject<Organization[]>(routeMatch.data.organizations);
return hydrateObject<
UseDataFunctionReturn<typeof appLoader>["organizations"]
>(routeMatch.data.organizations);
}

export function useCurrentOrganization() {
Expand All @@ -26,7 +26,7 @@ export function useCurrentOrganization() {
}

const result = hydrateObject<
PrismaReturnType<typeof getOrganizationFromSlug>
UseDataFunctionReturn<typeof orgLoader>["organization"]
>(routeMatch.data.organization);

if (result == null) return undefined;
Expand Down