Skip to content

Commit

Permalink
chore: change to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsojramos committed Oct 10, 2023
1 parent 828e1f4 commit aa3c048
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/utils/auth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { generateGitHubAPIUrl } from './helpers';

const { BrowserWindow } = require('@electron/remote');
import { BrowserWindow } from '@electron/remote';

import { generateGitHubAPIUrl } from './helpers';
import { apiRequest, apiRequestAuth } from '../utils/api-requests';
import { AuthResponse, AuthState, AuthTokenResponse } from '../types';
import { Constants } from '../utils/constants';
Expand Down
6 changes: 2 additions & 4 deletions src/utils/comms.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { ipcRenderer, shell } from 'electron';
import remote from '@electron/remote';
import {
updateTrayIcon,
openExternalLink,
setAutoLaunch,
restoreSetting,
} from './comms';

const { ipcRenderer, shell } = require('electron');

const remote = require('@electron/remote');

describe('utils/comms.ts', () => {
beforeEach(function () {
jest.spyOn(ipcRenderer, 'send');
Expand Down
4 changes: 2 additions & 2 deletions src/utils/comms.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { ipcRenderer, shell } = require('electron');
const remote = require('@electron/remote');
import { ipcRenderer, shell } from 'electron';
import remote from '@electron/remote';

export function openExternalLink(url: string): void {
shell.openExternal(url);
Expand Down

0 comments on commit aa3c048

Please sign in to comment.