Skip to content

Commit

Permalink
more context tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed Jun 1, 2024
1 parent b0c71e5 commit eb524ec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
14 changes: 6 additions & 8 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import { config } from "@services";
export default function HomePage() {
return (
<ClerkProvider publishableKey={config.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}>
<main>
<div className="flex-column-center">
<Header />
<Filters />
<DiscCount />
<DiscGrid />
<ScrollToTop />
</div>
<main className="flex-column-center">
<Header />
<Filters />
<DiscCount />
<DiscGrid />
<ScrollToTop />
</main>
</ClerkProvider>
);
Expand Down
2 changes: 0 additions & 2 deletions src/components/DiscContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export const DiscContextProvider = ({ discs, children }: DiscContextProviderProp
stabilities: []
});

if (!discs) return null;

return (
<DiscContext.Provider
value={{
Expand Down
5 changes: 5 additions & 0 deletions src/contexts/disc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createContext } from "react";

import type { DiscContext as TDiscContext } from "@types";

export const DiscContext = createContext<TDiscContext | null>(null);
6 changes: 1 addition & 5 deletions src/contexts/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import { createContext } from "react";

import type { DiscContext as TDiscContext } from "@types";

export const DiscContext = createContext<TDiscContext | null>(null);
export * from "./disc";

0 comments on commit eb524ec

Please sign in to comment.