Skip to content

Commit

Permalink
fixed error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanyam-2026 committed Jan 26, 2024
1 parent 8737422 commit 9ed24d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/DashboardComponents/ShowItems/ShowItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ const ShowItems = ({ title, items, type }) => {
};

// Sort items by name in ascending order
const sortedItems = items.slice().sort((a, b) => a.data?.name.localeCompare(b.data?.name));
const sortedItems = items?.slice().sort((a, b) => a.data?.name.localeCompare(b.data?.name));

return (
<div className='show-items'>
<div className="items-container">
{sortedItems.map((item, index) => (
{sortedItems?.map((item, index) => (
<div
key={index * 55}
className={`show-item ${type === 'file' ? 'file' : ''}`}
Expand Down

0 comments on commit 9ed24d9

Please sign in to comment.