Skip to content

Commit

Permalink
chore: improve file and function names
Browse files Browse the repository at this point in the history
  • Loading branch information
xn1cklas committed Sep 8, 2024
1 parent 1c208f1 commit 2abdf56
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/actions/checkout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"use server";

import { polar } from "@/utils/PolarClient";
import { polar } from "@/utils/polar-client";
import { redirect } from "next/navigation";

export async function checkout({
productPriceId,
successUrl,
}: {
productPriceId: string | undefined;
successUrl: string;
}) {
"use server";
const successUrl = "https://trained-technologist.com";

if (!productPriceId) {
redirect(successUrl);
Expand Down
4 changes: 2 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fetchProducts } from "@/components/fetch-products";
import { Pricing } from "@/components/Pricing";
import { Products } from "@/components/Products";

export default async function Page() {
const products = await Products();
const products = await fetchProducts();

return (
<div className="flex w-full flex-col items-center max-w-[100vw] md:max-w-7xl">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { polar } from "@/utils/PolarClient";
import { polar } from "@/utils/polar-client";
import { ProductOutput } from "@polar-sh/sdk/models/components";

export async function Products(): Promise<ProductOutput[]> {
export async function fetchProducts(): Promise<ProductOutput[]> {
try {
const result = await polar.products.list({
organizationId: process.env.NEXT_PUBLIC_POLAR_ORGANIZATION_ID,
Expand Down
File renamed without changes.

0 comments on commit 2abdf56

Please sign in to comment.