mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-20 20:06:39 +00:00
add site targets, client resources, and auto login
This commit is contained in:
@@ -3,20 +3,17 @@
|
||||
import ResourceContext from "@app/contexts/resourceContext";
|
||||
import { GetResourceAuthInfoResponse } from "@server/routers/resource";
|
||||
import { GetResourceResponse } from "@server/routers/resource/getResource";
|
||||
import { GetSiteResponse } from "@server/routers/site";
|
||||
import { useState } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
interface ResourceProviderProps {
|
||||
children: React.ReactNode;
|
||||
resource: GetResourceResponse;
|
||||
site: GetSiteResponse | null;
|
||||
authInfo: GetResourceAuthInfoResponse;
|
||||
}
|
||||
|
||||
export function ResourceProvider({
|
||||
children,
|
||||
site,
|
||||
resource: serverResource,
|
||||
authInfo: serverAuthInfo
|
||||
}: ResourceProviderProps) {
|
||||
@@ -66,7 +63,7 @@ export function ResourceProvider({
|
||||
|
||||
return (
|
||||
<ResourceContext.Provider
|
||||
value={{ resource, updateResource, site, authInfo, updateAuthInfo }}
|
||||
value={{ resource, updateResource, authInfo, updateAuthInfo }}
|
||||
>
|
||||
{children}
|
||||
</ResourceContext.Provider>
|
||||
|
||||
Reference in New Issue
Block a user