Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Dec 14, 2023
1 parent 662792d commit 7c2ff3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ chrome.storage.local.get("types", (result) => {

const windowGroupMaps: { [key: number]: Map<string, number> } = {};

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
chrome.runtime.onMessage.addListener((message) => {
chrome.storage.local.get("types", (resultStorage) => {
if (resultStorage.types) {
types = resultStorage.types;
Expand Down Expand Up @@ -159,7 +159,7 @@ async function handleNewTab(tab: chrome.tabs.Tab) {
}

async function handleTabUpdate(
tabId: number,
_tabId: number,
changeInfo: chrome.tabs.TabChangeInfo,
tab: chrome.tabs.Tab
) {
Expand All @@ -185,7 +185,7 @@ async function handleTabUpdate(

chrome.tabs.onCreated.addListener(handleNewTab);
chrome.tabs.onUpdated.addListener(handleTabUpdate);
chrome.tabs.onDetached.addListener((tabId, detachInfo) => {
chrome.tabs.onDetached.addListener((_tabId, detachInfo) => {
const windowId = detachInfo.oldWindowId;
if (
windowGroupMaps.hasOwnProperty(windowId) &&
Expand Down
10 changes: 5 additions & 5 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Popup = () => {
};

const enableAutoPosition = () => {
setIsAutoPosition((isAutoGroupPosition) => {
setIsAutoPosition(() => {
setStorage("isAutoPosition", !isAutoPosition);
return !isAutoPosition;
});
Expand Down Expand Up @@ -139,8 +139,8 @@ const Popup = () => {

<button
disabled={!newType}
className="rounded-md w-fit bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
text-white shadow-sm hover:bg-primary focus-visible:outline focus-visible:outline-2
className="rounded-md w-fit bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
text-white shadow-sm hover:bg-primary focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 disabled:bg-primary/sm"
>
Add
Expand Down Expand Up @@ -177,7 +177,7 @@ const Popup = () => {
<div className="flex items-center gap-x-4">
<button
disabled={!openAIKey || !types || !types.length}
className="inline-flex items-center rounded-md bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
className="inline-flex items-center rounded-md bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
text-white shadow-sm hover:bg-primary focus-visible:outline cursor-pointer
focus-visible:outline-2 focus-visible:outline-offset-2"
onClick={getAllTabsInfo}
Expand All @@ -187,7 +187,7 @@ const Popup = () => {
</button>

<button
className="inline-flex items-center rounded-md bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
className="inline-flex items-center rounded-md bg-primary/lg px-2.5 py-1.5 text-sm font-semibold
text-white shadow-sm hover:bg-primary focus-visible:outline cursor-pointer
focus-visible:outline-2 focus-visible:outline-offset-2"
onClick={ungroup}
Expand Down

0 comments on commit 7c2ff3c

Please sign in to comment.