Skip to content

Commit

Permalink
fix(skeleton): exclude imports for auth0 when not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Jan 14, 2025
1 parent b63278b commit e15e133
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skeleton/templates/src/main.tsx.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{#if (has features "auth0")}}
import { Auth0Provider } from "@auth0/auth0-react";
{{/if}}
{{#if (has features "auth0")}}
import AuthGuard from "@/components/AuthGuard/index.ts";
{{/if}}
import FullPageSpinner from "@/components/FullPageSpinner/index.ts";
import MultiProvider from "@/components/MultiProvider/index.ts";
import "@fontsource/roboto/300.css";
Expand Down
2 changes: 2 additions & 0 deletions skeleton/templates/src/mutations/article.ts.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{#if (has features "auth0")}}
import useAuthenticatedFetch from "@/hooks/useAuthenticatedFetch.ts";
{{/if}}
import type { articleAttributesSchema } from "@/queries/article.ts";
import { type UseMutationResult, useMutation, useQueryClient } from "@tanstack/react-query";
import { apiUrl } from "@/utils/api.ts";
Expand Down
2 changes: 2 additions & 0 deletions skeleton/templates/src/queries/article.ts.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{#if (has features "auth0")}}
import useAuthenticatedFetch from "@/hooks/useAuthenticatedFetch.ts";
{{/if}}
import { type UseQueryResult, keepPreviousData, useQuery } from "@tanstack/react-query";
import { apiUrl } from "@/utils/api.ts";
import {
Expand Down

0 comments on commit e15e133

Please sign in to comment.