Skip to content

Commit

Permalink
Rollback react to 17 (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrown32 authored Jul 9, 2022
1 parent 61d44cf commit 19ec564
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 87 deletions.
8 changes: 4 additions & 4 deletions packages/interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"@types/graphql-react": "^8.1.1",
"@types/html-webpack-plugin": "^3.2.5",
"@types/memory-fs": "^0.3.3",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/webpack": "^5.28.0",
"graphql-react": "^12.0.1",
"html-webpack-plugin": "^5.3.1",
"memory-fs": "^0.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"source-map-loader": "^2.0.1",
"uuid": "^8.3.2",
"webpack": "^5.33.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/interface/src/client/Authorize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export function Authorize({
);

// API and errors
const graphql = useContext<GraphQL>(GraphQLContext);
const graphql = useContext<GraphQL>(GraphQLContext as any);
const [operating, setOperating] = useState<null | boolean>(null);
const [redirecting, setRedirecting] = useState<boolean>(false);
const [errors, setErrors] = useState<string[]>([]);
Expand Down
2 changes: 1 addition & 1 deletion packages/interface/src/client/Default.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function Default({
const displayName = cacheValue?.data?.viewer?.user?.name;

// API and errors
const graphql = useContext<GraphQL>(GraphQLContext);
const graphql = useContext<GraphQL>(GraphQLContext as any);
const [operating, setOperating] = useState<boolean>(false);
const [errors, setErrors] = useState<string[]>([]);
async function onSubmit(e: FormEvent): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion packages/interface/src/client/useAuthenticatedEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function useAuthenticatedEndpoint(
authorization: null | Authorization,
clearAuthorization: () => void
): { fetchOptionsOverride: GraphQLFetchOptionsOverride } {
const graphql = useContext(GraphQLContext);
const graphql = useContext(GraphQLContext as any) as any;
if (!graphql)
throw new Error(
"The hook `useAuthenticatedEndpoint` must only be called inside a `GraphQLContext`."
Expand Down
8 changes: 4 additions & 4 deletions packages/strategy-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"@authx/scopes": "^3.1.0-alpha.48",
"@types/graphql-react": "^8.1.1",
"@types/pg": "^7.14.11",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/uuid": "^8.3.0",
"graphql": "15.5.0",
"graphql-react": "^12.0.1",
"pg": "^8.6.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"uuid": "^8.3.2"
},
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/strategy-email/src/interface/EmailAuthority.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function EmailAuthority({
}, []);

// API and errors
const graphql = useContext<GraphQL>(GraphQLContext);
const graphql = useContext<GraphQL>(GraphQLContext as any);
const [operating, setOperating] = useState<boolean>(false);
const [errors, setErrors] = useState<string[]>([]);
async function onSubmit(e: FormEvent): Promise<void> {
Expand Down
8 changes: 4 additions & 4 deletions packages/strategy-openid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"@authx/strategy-email": "^3.1.0-alpha.48",
"@types/graphql-react": "^8.1.1",
"@types/pg": "^7.14.11",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/uuid": "^8.3.0",
"graphql": "15.5.0",
"graphql-react": "^12.0.1",
"pg": "^8.6.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"uuid": "^8.3.2"
},
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/strategy-openid/src/interface/OpenIdAuthority.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function OpenIdAuthority({
}, []);

// API and errors
const graphql = useContext<GraphQL>(GraphQLContext);
const graphql = useContext<GraphQL>(GraphQLContext as any);
const [errors, setErrors] = useState<string[]>([]);
async function onSubmit(e: FormEvent): Promise<void> {
e.preventDefault();
Expand Down
8 changes: 4 additions & 4 deletions packages/strategy-password/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"@types/bcrypt": "^3.0.1",
"@types/graphql-react": "^8.1.1",
"@types/pg": "^7.14.11",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/uuid": "^8.3.0",
"bcrypt": "^5.0.1",
"graphql": "15.5.0",
"graphql-react": "^12.0.1",
"pg": "^8.6.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"uuid": "^8.3.2"
},
"description": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function PasswordAuthority({
const [password, setPassword] = useState<string>("");

// API and errors
const graphql = useContext<GraphQL>(GraphQLContext);
const graphql = useContext<GraphQL>(GraphQLContext as any);
const [operating, setOperating] = useState<boolean>(false);
const [errors, setErrors] = useState<string[]>([]);
async function onSubmit(e: FormEvent): Promise<void> {
Expand Down
8 changes: 4 additions & 4 deletions packages/strategy-saml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@types/bcrypt": "^3.0.1",
"@types/graphql-react": "^8.1.1",
"@types/pg": "^7.14.11",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/saml2-js": "^2.0.0",
"@types/uuid": "^8.3.0",
"bcrypt": "^5.0.1",
Expand All @@ -17,8 +17,8 @@
"koa-body": "^4.2.0",
"koa-router": "^10.0.0",
"pg": "^8.6.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"saml2-js": "^3.0.1",
"uuid": "^8.3.2"
},
Expand Down
Loading

0 comments on commit 19ec564

Please sign in to comment.