Use trust center from context
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { createContext, type ReactNode } from "react";
|
||||
import type { TrustGraphQuery$data } from "/queries/__generated__/TrustGraphQuery.graphql";
|
||||
|
||||
export const TrustCenterContext = createContext<
|
||||
TrustGraphQuery$data["trustCenterBySlug"] | null
|
||||
TrustGraphQuery$data["currentTrustCenter"] | null
|
||||
>(null);
|
||||
|
||||
export const TrustCenterProvider = ({
|
||||
@@ -10,7 +10,7 @@ export const TrustCenterProvider = ({
|
||||
trustCenter,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
trustCenter: TrustGraphQuery$data["trustCenterBySlug"];
|
||||
trustCenter: TrustGraphQuery$data["currentTrustCenter"];
|
||||
}) => {
|
||||
return (
|
||||
<TrustCenterContext.Provider value={trustCenter}>
|
||||
|
||||
Reference in New Issue
Block a user