Skip to content

Commit

Permalink
fix: use 'ably' as import path from react-hooks
Browse files Browse the repository at this point in the history
This reapplies 7af5a4b which apparently
got lost at some point during merge commits from `main` into
`integration/v2`.

Resolves #1619
  • Loading branch information
VeskeR committed Feb 15, 2024
1 parent 7f4e17c commit af2e916
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/platform/react-hooks/src/AblyReactHooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Ably from '../../../../ably.js';
import * as Ably from 'ably';

export type ChannelNameAndOptions = {
channelName: string;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/react-hooks/src/hooks/useChannel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { it, beforeEach, describe, expect, vi } from 'vitest';
import { useChannel } from './useChannel.js';
import { render, screen, waitFor } from '@testing-library/react';
import { FakeAblySdk, FakeAblyChannels } from '../fakes/ably.js';
import * as Ably from '../../../../../ably.js';
import * as Ably from 'ably';
import { act } from 'react-dom/test-utils';
import { AblyProvider } from '../AblyProvider.js';

Expand Down
2 changes: 1 addition & 1 deletion src/platform/react-hooks/src/hooks/useChannel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Ably from '../../../../../ably.js';
import * as Ably from 'ably';
import { useEffect, useMemo, useRef } from 'react';
import { channelOptionsWithAgent, ChannelParameters } from '../AblyReactHooks.js';
import { useAbly } from './useAbly.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef } from 'react';
import * as Ably from '../../../../../ably.js';
import * as Ably from 'ably';
import { ChannelNameAndId, ChannelNameAndOptions, channelOptionsWithAgent } from '../AblyReactHooks.js';
import { useAbly } from './useAbly.js';
import { useEventListener } from './useEventListener.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Ably from '../../../../../ably.js';
import * as Ably from 'ably';
import { useAbly } from './useAbly.js';
import { useEventListener } from './useEventListener.js';

Expand Down
2 changes: 1 addition & 1 deletion src/platform/react-hooks/src/hooks/useEventListener.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Ably from '../../../../../ably.js';
import * as Ably from 'ably';
import { useEffect, useRef } from 'react';

type EventListener<T> = (stateChange: T) => any;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/react-hooks/src/hooks/useStateErrors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorInfo } from '../../../../../ably.js';
import { ErrorInfo } from 'ably';
import { useState } from 'react';
import { useConnectionStateListener } from './useConnectionStateListener.js';
import { useChannelStateListener } from './useChannelStateListener.js';
Expand Down

0 comments on commit af2e916

Please sign in to comment.