mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-20 02:00:49 +00:00
Make some functional components pure
This commit is contained in:
parent
3cb61a8681
commit
7c5d3f449d
3 changed files with 9 additions and 3 deletions
|
@ -14,7 +14,7 @@ export interface ModalProps {
|
||||||
bgDismiss?: boolean;
|
bgDismiss?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Modal({
|
function Modal({
|
||||||
active,
|
active,
|
||||||
title,
|
title,
|
||||||
onClose,
|
onClose,
|
||||||
|
@ -67,3 +67,5 @@ export default function Modal({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default React.memo(Modal);
|
||||||
|
|
|
@ -9,7 +9,7 @@ export interface PageListProps {
|
||||||
onPageChange: (page: number) => void;
|
onPageChange: (page: number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PageList({
|
function PageList({
|
||||||
current,
|
current,
|
||||||
max,
|
max,
|
||||||
min,
|
min,
|
||||||
|
@ -116,3 +116,5 @@ export default function PageList({
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default React.memo(PageList);
|
||||||
|
|
|
@ -10,7 +10,7 @@ export interface TabbedViewProps {
|
||||||
tabs: TabItem[];
|
tabs: TabItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TabbedView({
|
function TabbedView({
|
||||||
tabs,
|
tabs,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<TabbedViewProps>): React.ReactElement {
|
}: React.PropsWithChildren<TabbedViewProps>): React.ReactElement {
|
||||||
|
@ -36,3 +36,5 @@ export default function TabbedView({
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default React.memo(TabbedView);
|
||||||
|
|
Loading…
Reference in a new issue