Skip to content

Commit

Permalink
fix Logs tab Items section title
Browse files Browse the repository at this point in the history
  • Loading branch information
seabeya committed Sep 19, 2024
1 parent bf0f9e9 commit 0a4a4b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/sections/ItemTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useItemsStore, useModeStore } from '@/store';
import SectionArea from '@/components/shared/SectionArea';
import ItemTab from '@/components/ItemTab';
import { dbIndex } from '@/consts';

type ItemTabsProps = {
activeTab: string;
Expand All @@ -11,14 +10,15 @@ type ItemTabsProps = {
export default function ItemTabs({ activeTab, handleTabClick }: ItemTabsProps) {
const Mode = useModeStore.getState().mode;

const sectionTitle = `${dbIndex[Mode][0].toUpperCase() + dbIndex[Mode].slice(1)}s`;

let sectionTitle = '';
let items: string[] = [];

if (Mode === 'users') {
items = useItemsStore.getState().users;
sectionTitle = 'Users';
} else if (Mode === 'events') {
items = useItemsStore.getState().channels;
sectionTitle = 'Channels';
}

return (
Expand Down

0 comments on commit 0a4a4b8

Please sign in to comment.