Skip to content

Commit

Permalink
feat: add console log to background script and update login component
Browse files Browse the repository at this point in the history
- Add `chrome.storage.sync.get` function to background script for debugging purposes
- Update `handleTokenChange` function in Login component to use `React.ChangeEvent<HTMLInputElement>`
- Remove unused imports from Popup component
  • Loading branch information
ajyey committed Jun 19, 2023
1 parent ea061e5 commit 63ba16b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/pages/background/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
console.log('background script loaded');
chrome.storage.sync.get(null, function (data) {
console.info(data);
});
2 changes: 1 addition & 1 deletion src/pages/popup/Popup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React from 'react';
import LoginComponent from '@pages/popup/components/login/Login';
import HomeComponent from '@pages/popup/components/home/Home';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/popup/components/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import LoginSubmitButtonComponent from '@pages/popup/components/login/LoginSubmi
export default function LoginComponent() {
const [apiToken, setApiToken] = useState('');

const handleTokenChange = (e: any) => {
const handleTokenChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setApiToken(e.target.value);
};
const handleSubmit = () => {
Expand Down

0 comments on commit 63ba16b

Please sign in to comment.