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;
|
||||
}
|
||||
|
||||
export default function Modal({
|
||||
function Modal({
|
||||
active,
|
||||
title,
|
||||
onClose,
|
||||
|
@ -67,3 +67,5 @@ export default function Modal({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(Modal);
|
||||
|
|
|
@ -9,7 +9,7 @@ export interface PageListProps {
|
|||
onPageChange: (page: number) => void;
|
||||
}
|
||||
|
||||
export default function PageList({
|
||||
function PageList({
|
||||
current,
|
||||
max,
|
||||
min,
|
||||
|
@ -116,3 +116,5 @@ export default function PageList({
|
|||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(PageList);
|
||||
|
|
|
@ -10,7 +10,7 @@ export interface TabbedViewProps {
|
|||
tabs: TabItem[];
|
||||
}
|
||||
|
||||
export default function TabbedView({
|
||||
function TabbedView({
|
||||
tabs,
|
||||
children,
|
||||
}: React.PropsWithChildren<TabbedViewProps>): React.ReactElement {
|
||||
|
@ -36,3 +36,5 @@ export default function TabbedView({
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(TabbedView);
|
||||
|
|
Loading…
Reference in a new issue