mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-24 22:06:38 +00:00
Merge branch 'dev' into auth-providers-clients
This commit is contained in:
16
src/contexts/apiKeyContext.ts
Normal file
16
src/contexts/apiKeyContext.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file is licensed under the Fossorial Commercial License.
|
||||
// Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||
//
|
||||
// Copyright (c) 2025 Fossorial LLC. All rights reserved.
|
||||
|
||||
import { GetApiKeyResponse } from "@server/routers/apiKeys";
|
||||
import { createContext } from "react";
|
||||
|
||||
interface ApiKeyContextType {
|
||||
apiKey: GetApiKeyResponse;
|
||||
updateApiKey: (updatedApiKey: Partial<GetApiKeyResponse>) => void;
|
||||
}
|
||||
|
||||
const ApiKeyContext = createContext<ApiKeyContextType | undefined>(undefined);
|
||||
|
||||
export default ApiKeyContext;
|
||||
20
src/contexts/licenseStatusContext.ts
Normal file
20
src/contexts/licenseStatusContext.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// This file is licensed under the Fossorial Commercial License.
|
||||
// Unauthorized use, copying, modification, or distribution is strictly prohibited.
|
||||
//
|
||||
// Copyright (c) 2025 Fossorial LLC. All rights reserved.
|
||||
|
||||
import { LicenseStatus } from "@server/license/license";
|
||||
import { createContext } from "react";
|
||||
|
||||
type LicenseStatusContextType = {
|
||||
licenseStatus: LicenseStatus | null;
|
||||
updateLicenseStatus: (updatedSite: LicenseStatus) => void;
|
||||
isLicenseViolation: () => boolean;
|
||||
isUnlocked: () => boolean;
|
||||
};
|
||||
|
||||
const LicenseStatusContext = createContext<
|
||||
LicenseStatusContextType | undefined
|
||||
>(undefined);
|
||||
|
||||
export default LicenseStatusContext;
|
||||
Reference in New Issue
Block a user