Skip to content

Commit

Permalink
refactor: remove redundant prop
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktoriasalamon committed Jul 19, 2024
1 parent 1b067ea commit 7e7aa3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/common/Tabs/Tabs.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export interface TabsProps {
current: Option;
onTabChange: (tab: Option) => void;
className?: string;
centered?: boolean;
}
7 changes: 2 additions & 5 deletions frontend/src/components/common/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TabsProps } from './Tabs.interface';
import { generateClassNames } from '@app/utils';
import { useTabs } from './Tabs.hooks';

export const Tabs: FC<TabsProps> = ({ tabs, current, onTabChange, className, centered }) => {
export const Tabs: FC<TabsProps> = ({ tabs, current, onTabChange, className }) => {
const { handleSelectTab } = useTabs(tabs, onTabChange);
return (
<div>
Expand All @@ -25,10 +25,7 @@ export const Tabs: FC<TabsProps> = ({ tabs, current, onTabChange, className, cen
</div>
<div className="hidden sm:block">
<div className="border-b border-navy-200">
<nav
aria-label="Tabs"
className={generateClassNames('flex space-x-8', { 'justify-center': centered }, className)}
>
<nav aria-label="Tabs" className={generateClassNames('flex space-x-8', className)}>
{tabs.map((tab) => (
<div
key={tab.id}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/pages/MySpace/MySpace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const MySpace: React.FC<MySpaceProps> = ({ data }) => {
My Space
</Typography>
<Header user={user} currentLevel={currentLevel} nextLevel={nextLevel} />
<Tabs tabs={mySpaceTabs} current={currentTab} onTabChange={setCurrentTab} centered />
<Tabs tabs={mySpaceTabs} current={currentTab} onTabChange={setCurrentTab} className="justify-center" />
<div>{currentTab.id === 'ladder' && <LadderTab bands={ladder.bands} currentLevel={currentLevel.band} />}</div>
</div>
);
Expand Down

0 comments on commit 7e7aa3a

Please sign in to comment.