Skip to content

Commit

Permalink
Fix deploy failure due to require statement (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowtorola authored Dec 7, 2024
1 parent 8fa36a7 commit eac40ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
14 changes: 3 additions & 11 deletions frontend/src/api/loaders/myTeamLoader.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
import type { QueryClient } from "@tanstack/react-query";
import type { LoaderFunction } from "react-router-dom";
import { myTeamFactory } from "../team/teamFactories";
import { buildKey, safeEnsureQueryData } from "../helpers";
import { safeEnsureQueryData } from "../helpers";
import { scrimmagingRecordFactory } from "api/compete/competeFactories";
import { CompeteMatchScrimmagingRecordRetrieveScrimmageTypeEnum } from "api/_autogen";
import toast from "react-hot-toast";

export const myTeamLoader =
(queryClient: QueryClient): LoaderFunction =>
async ({ params }) => {
({ params }) => {
const { episodeId } = params;

if (episodeId === undefined) return null;

// My team info
try {
await queryClient.ensureQueryData({
queryKey: buildKey(myTeamFactory.queryKey, { episodeId }),
queryFn: async () => await myTeamFactory.queryFn({ episodeId }),
});
} catch {
toast("Join a team to compete!");
}
safeEnsureQueryData({ episodeId }, myTeamFactory, queryClient);

// Ranked and Unranked Scrimmage Record
safeEnsureQueryData(
Expand Down
10 changes: 6 additions & 4 deletions frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
/** @type {import('tailwindcss').Config} */
const colors = require("tailwindcss/colors");
const defaultTheme = require("tailwindcss/defaultTheme");
import formsPlugin from "@tailwindcss/forms";
import headlessPlugin from "@headlessui/tailwindcss";
import tailwind from "tailwindcss/defaultConfig";

module.exports = {
content: ["./index.html", "./src/**/*.{js,jsx,ts,tsx}"],
theme: {
...tailwind.theme,
extend: {
container: {
center: true,
},
fontFamily: {
sans: ["Inter", ...defaultTheme.fontFamily.sans],
sans: ["Inter", "sans-serif"],
display: ['"Josefin Sans"', "sans-serif"],
},
},
},
plugins: [require("@tailwindcss/forms"), require("@headlessui/tailwindcss")],
plugins: [formsPlugin, headlessPlugin],
};

0 comments on commit eac40ec

Please sign in to comment.