Skip to content

Commit

Permalink
fix: code smells (#603)
Browse files Browse the repository at this point in the history
* fix: code smells

* chore: remove todo

* fix: code smells
  • Loading branch information
spaenleh committed Jan 14, 2025
1 parent 689f89e commit 7298252
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
7 changes: 4 additions & 3 deletions src/components/ui/Navigator/CurrentItemNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Stack } from '@mui/material';

import { DiscriminatedItem, ItemType } from '@graasp/sdk';

import { TypographyLink } from '../TypographyLink.js';
import ItemMenu, { ItemMenuProps } from './ItemMenu.js';
import CenterAlignWrapper from './common/CenterAlignWrapper.js';

export type CurrentItemProps = {
item: DiscriminatedItem;
Expand All @@ -24,7 +25,7 @@ export function CurrentItemNavigation({
showArrow,
}: Readonly<CurrentItemProps>): JSX.Element | null {
return (
<CenterAlignWrapper>
<Stack alignItems="center">
<TypographyLink
id={buildBreadcrumbsItemLinkId?.(item.id)}
key={item.id}
Expand All @@ -43,6 +44,6 @@ export function CurrentItemNavigation({
renderArrow={showArrow}
/>
)}
</CenterAlignWrapper>
</Stack>
);
}
8 changes: 0 additions & 8 deletions src/components/ui/Navigator/common/CenterAlignWrapper.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/ui/Navigator/common/constants.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function EditPublicProfile({
mode: 'onChange',
defaultValues: {
bio: profile?.bio,
// TODO: sanitize links
twitterID: profile?.twitterID,
facebookID: profile?.facebookID,
linkedinID: profile?.linkedinID,
Expand Down
5 changes: 4 additions & 1 deletion src/modules/landing/home/UserStoryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const StyledAnchor = styled('a')(({ theme }) => ({
padding: theme.spacing(2, 4),
}));

export function UserStoryButton({ id, text }: { id: string; text: string }) {
export function UserStoryButton({
id,
text,
}: Readonly<{ id: string; text: string }>) {
return (
<StyledAnchor href={`#${id}`}>
{text}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/landing/support/SmallTutorialCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export function SmallTutorialCard({
title,
description,
link,
}: {
}: Readonly<{
title: string;
description: string;
link: string;
}) {
}>) {
const { t } = useTranslation(NS.Landing, { keyPrefix: 'SUPPORT.TUTORIALS' });
return (
<Card sx={{ width: '100%', height: '100%', p: 2, textAlign: 'center' }}>
Expand Down

0 comments on commit 7298252

Please sign in to comment.