Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguyinabeanie committed Nov 9, 2024
1 parent 5714d3f commit 9148a6f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions apps/nextjs/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ export const metadata: Metadata = {
title: "battlestadium.gg",
};

export default function Home () {
export default function Home() {
return (
<HydrateClient>
<div className="min--h-screen flex flex-col items-center justify-between">
<div className="mt-8 md:mt-20">
<PartneredOrganizations />
</div>
<div className="flex w-full max-w-fit flex-col items-center justify-center bg-transparent pt-10 text-center">
<h1 className={ title({ color: "violet", size: "xl" }) }>
<h1 className={title({ color: "violet", size: "xl" })}>
battlestadium.gg
</h1>
<h2 className={ `${title({ size: "xs" })} pt-2` }>
<h2 className={`${title({ size: "xs" })} pt-2`}>
a next-gen tournament website
</h2>
<div className="flex flex-col justify-items-center">
<h2 className={ `${title({ size: "xxs" })} pt-1` }>
<h2 className={`${title({ size: "xxs" })} pt-1`}>
beautiful, fast, modern
</h2>
<h2 className={ `${title({ color: "violet", size: "xs" })} pt-4` }>
<h2 className={`${title({ color: "violet", size: "xs" })} pt-4`}>
Coming Soon
</h2>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/nextjs/src/app/server-actions/accounts/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { auth } from "@clerk/nextjs/server";
import type { paths } from "~/lib/api/openapi-v1";
import { BattleStadiumApiClient, defaultConfig } from "~/lib/api";

export async function getAccounts (
export async function getAccounts(
options?: FetchOptions<paths["/accounts"]["get"]>,
) {
const usersOptions = {
Expand All @@ -18,7 +18,7 @@ export async function getAccounts (
return BattleStadiumApiClient(skipClerkAuth).GET("/accounts", usersOptions);
}

export async function getAccount (
export async function getAccount(
username: string,
options?: FetchOptions<paths["/accounts/{username}"]["get"]>,
) {
Expand All @@ -31,7 +31,7 @@ export async function getAccount (
return BattleStadiumApiClient().GET("/accounts/{username}", userOptions);
}

export async function getAccountMe (
export async function getAccountMe(
options?: FetchOptions<paths["/accounts/me"]["get"]>,
) {
const { userId } = await auth();
Expand Down
8 changes: 4 additions & 4 deletions apps/nextjs/src/lib/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ import { env } from "~/env";

export const DEFAULT_CACHE_TIMEOUT = 300;

export function defaultConfig (tag: string, revalidate?: number) {
export function defaultConfig(tag: string, revalidate?: number) {
return {
next: { tags: [tag], revalidate: revalidate ?? DEFAULT_CACHE_TIMEOUT },
};
}

export function getBaseUrl () {
export function getBaseUrl() {
if ([env.NODE_ENV, env.VERCEL_ENV].includes("production")) {
return `${env.PROD_API_BASE_URL}`;
}

return `http://${env.LOCAL_DEV_BACKEND_HOST}:${env.LOCAL_DEV_BACKEND_PORT}`;
}

export function BattleStadiumApiClient (skipClerkAuth = false) {
export function BattleStadiumApiClient(skipClerkAuth = false) {
const baseUrl = `${getBaseUrl()}/api/v1`;
const fetchClient = createFetchClient<paths>({ baseUrl });

const authMiddleware: Middleware = {
async onRequest ({ request }) {
async onRequest({ request }) {
if (env.NODE_ENV !== "development") {
request.headers.set(
"X-Vercel-OIDC-Token",
Expand Down

0 comments on commit 9148a6f

Please sign in to comment.