Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/components/Taskbar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
forwardRef,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
} from 'react'
import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react'
import { styled } from 'styled-components'
import { AppBar, Toolbar, Button, Frame, Separator } from 'react95'
import StartMenu from './StartMenu'
Expand Down Expand Up @@ -190,11 +183,6 @@ export default function Taskbar() {
}
}, [open])

const orderedWindows = useMemo(
() => [...windows].sort((a, b) => a.zIndex - b.zIndex),
[windows]
)

return (
<TaskbarAppBar position="relative">
<TaskbarToolbar>
Expand All @@ -207,7 +195,7 @@ export default function Taskbar() {
<Separator orientation="vertical" size={28} />

<WindowButtonsFrame>
{orderedWindows.map(window => {
{windows.map(window => {
const definition = apps[window.appId]
const isActive = activeWindowId === window.id && !window.minimized

Expand Down