Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
chore: bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Feb 23, 2024
1 parent 3c976ee commit 9da605d
Show file tree
Hide file tree
Showing 8 changed files with 494 additions and 3,810 deletions.
4,223 changes: 459 additions & 3,764 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@reduxjs/toolkit": "^1.9.0",
"mobile-detect": "^1.4.5",
"classnames": "^2.3.2",
"next": "^12.3.1",
"mobile-detect": "^1.4.5",
"next": "^13.0.3",
"next-auth": "^4.16.4",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand All @@ -28,7 +28,7 @@
"swr": "^1.3.0"
},
"devDependencies": {
"@next/eslint-plugin-next": "^12.3.1",
"@next/eslint-plugin-next": "^13.0.3",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
Expand All @@ -42,12 +42,13 @@
"chance": "^1.1.9",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react": "^7.31.10",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"sass": "^1.56.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.1.2"
}
}
3 changes: 0 additions & 3 deletions src/components/common/Avatar.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.avatar {
position: relative;
border-radius: 50%;
overflow: hidden;
aspect-ratio: 1/1;
min-width: 40px;
user-select: none;
}
19 changes: 11 additions & 8 deletions src/components/common/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ import Image from 'next/image';

export type AvatarProps = {
src: string;
size?: number;
}

export function Avatar({
src
src,
size = 40
}: AvatarProps): JSX.Element {
return (
<div className={styles.avatar}>
<Image
alt='Avatar'
layout='fill'
src={src}
/>
</div>
<Image
alt='Avatar'
width={size}
height={size}
className={styles.avatar}
src={src}
priority
/>
)
}
8 changes: 2 additions & 6 deletions src/components/common/Button/ButtonBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ export function ButtonBase<E extends React.ElementType = typeof DEFAULT_ELEMENT>
return (
<Element
{...extraProps}
data-testid='button-base'
className={className}
disabled={disabled}
draggable={false}
>
<a
data-testid='button-base'
className={className}
>
{children}
</a>
{children}
</Element>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/Button/__tests__/ButtonBase.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ describe('Component(Button)', () => {
});

it('should support NextJS Links', () => {
const { baseElement, getByTestId } = renderButton<ButtonBaseProps<typeof Link>>({
const { baseElement, getByText } = renderButton<ButtonBaseProps<typeof Link>>({
as: Link,
href: 'https://silvy.rains.cafe'
});

expect(baseElement.querySelector('a')).toBeTruthy();
expect(getByTestId('button-base')).toHaveAttribute('href');
expect(getByText('UwU')).toHaveAttribute('href');
});

it('should support being enabled', async () => {
Expand Down
33 changes: 11 additions & 22 deletions src/components/common/__tests__/__snapshots__/Avatar.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,17 @@
exports[`Component(Avatar) should display the Avatar 1`] = `
<body>
<div>
<span
style="box-sizing: border-box; display: inline-block; overflow: hidden; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; position: relative; max-width: 100%;"
>
<span
style="box-sizing: border-box; display: block; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; max-width: 100%;"
>
<img
alt=""
aria-hidden="true"
src="data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%2740%27%20height=%2740%27/%3e"
style="display: block; max-width: 100%; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px;"
/>
</span>
<img
class="avatar"
data-nimg="intrinsic"
decoding="async"
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
style="position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; box-sizing: border-box; padding: 0px; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%;"
/>
<noscript />
</span>
<img
alt="Avatar"
class="avatar"
data-nimg="1"
decoding="async"
height="40"
src="/_next/image?url=https%3A%2F%2Fsilvy.rains.cafe&w=96&q=75"
srcset="/_next/image?url=https%3A%2F%2Fsilvy.rains.cafe&w=48&q=75 1x, /_next/image?url=https%3A%2F%2Fsilvy.rains.cafe&w=96&q=75 2x"
style="color: transparent;"
width="40"
/>
</div>
</body>
`;
5 changes: 4 additions & 1 deletion src/components/strats/AuthorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export function AuthorCard({
</Typography>
<Pronouns pronouns={author.pronouns}/>
</div>
<Avatar src={author.image} />
<Avatar
src={author.image}
size={90}
/>
</Card>
);
}

0 comments on commit 9da605d

Please sign in to comment.