Skip to content

Commit 2c1fa32

Browse files
committed
fix group not open urls
1 parent 9cb7537 commit 2c1fa32

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/groups/Group.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import { createTab } from '../utils/tabs'
2+
3+
function openUrls(urls) {
4+
urls.toReversed().forEach((url, index) => {
5+
setTimeout(() => createTab(url), index * 250)
6+
})
7+
}
8+
19
export default function Group({ name, urls }) {
210
return (
311
<div
412
className="flex flex-col px-2 py-1 rounded-lg justify-center gap-2 hover:cursor-pointer hover:bg-blue-200 hover:*:bg-opacity-25"
5-
onClick={(e) => {
13+
onClick={() => {
614
openUrls(urls)
715
}}
816
>

src/groups/Groups.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ function openInNewTab() {
1414
}, 250)
1515
}
1616

17-
function openUrls(urls) {
18-
urls.toReversed().forEach((url, index) => {
19-
setTimeout(() => createTab(url), index * 250)
20-
})
21-
}
22-
2317
export default function Groups({ setShowsGroups }) {
2418
const [groups, setGroups] = useState(devdb.groups)
2519
const [editing, setEditing] = useState(false)

0 commit comments

Comments
 (0)