Skip to content

Commit 322c40e

Browse files
committed
Import WarrantCheck type from warrant-js
1 parent 9d41f15 commit 322c40e

File tree

7 files changed

+5
-29
lines changed

7 files changed

+5
-29
lines changed

src/ProtectedComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import WarrantCheck from "../types/WarrantCheck";
2+
import { WarrantCheck } from "@warrantdev/warrant-js";
33
import useWarrant from "./useWarrant";
44

55
export interface ProtectedComponentProps extends WarrantCheck {

src/ProtectedRoute.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import { Redirect, Route, RouteProps } from "react-router-dom";
3-
import { WARRANT_IGNORE_ID } from "@warrantdev/warrant-js";
3+
import { WARRANT_IGNORE_ID, WarrantCheck } from "@warrantdev/warrant-js";
44
import useWarrant from "./useWarrant";
5-
import WarrantCheck from "../types/WarrantCheck";
65

76
export interface ProtectedRouteOptions extends WarrantCheck {
87
redirectTo: string;

src/WarrantContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createContext } from "react";
2-
import WarrantCheck from "../types/WarrantCheck";
2+
import { WarrantCheck } from "@warrantdev/warrant-js";
33

44
export interface AuthorizationContext {
55
clientKey: string;

src/WarrantProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useCallback, useEffect, useState } from "react";
22
import { Client as WarrantClient } from "@warrantdev/warrant-js";
33

4-
import WarrantCheck from "../types/WarrantCheck";
4+
import { WarrantCheck } from "@warrantdev/warrant-js";
55
import WarrantContext from "./WarrantContext";
66

77
export interface AuthorizationProvider {

src/withWarrant.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import WarrantCheck from "../types/WarrantCheck";
2+
import { WarrantCheck } from "@warrantdev/warrant-js";
33
import useWarrant from "./useWarrant";
44

55
export interface WithWarrantOptions {

types/Warrant.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

types/WarrantCheck.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)