Skip to content

Commit

Permalink
refacto(deps): update project dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmartineau committed Apr 1, 2024
1 parent 7a0a42a commit d77079d
Show file tree
Hide file tree
Showing 27 changed files with 21,026 additions and 15,741 deletions.
14 changes: 0 additions & 14 deletions .babelrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"apple-touch-icons": "off"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC, useState } from 'react';
import styled from 'styled-components';
import AddIcon from '@material-ui/icons/Add';
import AddIcon from '@mui/icons-material/Add';
import { Button } from '~/client/components/Toolkit';
import AddWineFamilyModal from './AddWineFamilyModal';

Expand Down
2 changes: 1 addition & 1 deletion client/components/Add/PictureStep.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC, useState } from 'react';
import { connect, ConnectedProps } from 'react-redux';
import DeleteIcon from '@material-ui/icons/Delete';
import DeleteIcon from '@mui/icons-material/Delete';
import { Upload } from './Upload/Upload';
import { uploadWinePicture } from '../../api';
import { PICTURE_UPLOAD } from '~/config';
Expand Down
2 changes: 1 addition & 1 deletion client/components/Add/Upload/Upload.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import Dropzone, { DropEvent } from 'react-dropzone';
import AddAPhotoIcon from '@material-ui/icons/AddAPhoto';
import AddAPhotoIcon from '@mui/icons-material/AddAPhoto';
import { Button } from '~/client/components/Toolkit';

type Props = {
Expand Down
6 changes: 5 additions & 1 deletion client/components/Cellar/Box/BoxContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ type Props = {
className?: string;
};

const BoxContainer: FC<Props> = ({ boxId, children, className }) => {
const BoxContainer: FC<React.PropsWithChildren<Props>> = ({
boxId,
children,
className,
}) => {
const box = CELLAR_SCHEMA[boxId];
const canvasWidth = box.schema[0] * CELL_SIZE;
const canvasHeigh = box.schema[1] * CELL_SIZE;
Expand Down
4 changes: 2 additions & 2 deletions client/components/Favorite/AddToFavoriteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { FC } from 'react';

import { connect, ConnectedProps } from 'react-redux';
import styled from 'styled-components';
import FavoriteIcon from '@material-ui/icons/Favorite';
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
import FavoriteIcon from '@mui/icons-material/Favorite';
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
import { Button } from '~/client/components/Toolkit';
import { addToFavorite, removeFromFavorite, RootState } from '~/client/store';
import { ThunkDispatch } from 'redux-thunk';
Expand Down
27 changes: 14 additions & 13 deletions client/components/Layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { FC } from 'react';
import Link from 'next/link';
import HomeIcon from '@material-ui/icons/Home';
import AddIcon from '@material-ui/icons/Add';
import SearchIcon from '@material-ui/icons/Search';
import FolderOpenIcon from '@material-ui/icons/FolderOpen';
import HomeIcon from '@mui/icons-material/Home';
import AddIcon from '@mui/icons-material/Add';
import SearchIcon from '@mui/icons-material/Search';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import styled from 'styled-components';
import { withRouter } from 'next/router';
import { WithRouterProps } from 'next/dist/client/with-router';
Expand Down Expand Up @@ -44,7 +44,7 @@ const List = styled.ul`
display: flex;
list-style-type: none;
`;
const ListItem = styled.a<{
const ListItem = styled(Link)<{
router: WithRouterProps['router'];
route: RouteType;
}>`
Expand Down Expand Up @@ -87,14 +87,15 @@ const Menu: FC<Props> = ({ router }) => (
<List>
{routes.map((route) => {
return (
<Link key={route.href} href={route.href}>
<ListItem route={route} router={router} href={route.href}>
<ListItemIcon className="material-icons">
{route.icon}
</ListItemIcon>
<ListItemName>{route.label}</ListItemName>
</ListItem>
</Link>
<ListItem
key={route.href}
href={route.href}
route={route}
router={router}
>
<ListItemIcon className="material-icons">{route.icon}</ListItemIcon>
<ListItemName>{route.label}</ListItemName>
</ListItem>
);
})}
</List>
Expand Down
5 changes: 4 additions & 1 deletion client/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ type Props = {
title: string;
};

export const Layout: FC<Props> = ({ title, children }) => {
export const Layout: FC<React.PropsWithChildren<Props>> = ({
title,
children,
}) => {
return (
<App>
<Header />
Expand Down
14 changes: 8 additions & 6 deletions client/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ type ReactModalAdapterProps = {
modalClassName?: string;
};

const ReactModalAdapter: FC<ReactModalAdapterProps> = ({
className,
modalClassName,
...props
}) => {
const ReactModalAdapter: FC<React.PropsWithChildren<
ReactModalAdapterProps
>> = ({ className, modalClassName, ...props }) => {
return (
<ReactModal
ariaHideApp={false}
Expand Down Expand Up @@ -79,7 +77,11 @@ type ModalProps = {
onRequestClose: Function;
};

export const Modal: FC<ModalProps> = ({ isOpen, onRequestClose, children }) => {
export const Modal: FC<React.PropsWithChildren<ModalProps>> = ({
isOpen,
onRequestClose,
children,
}) => {
return (
<>
<GlobalStyle />
Expand Down
2 changes: 1 addition & 1 deletion client/components/Search/EmptyResults.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { connect, ConnectedProps } from 'react-redux';
import SearchIcon from '@material-ui/icons/Search';
import SearchIcon from '@mui/icons-material/Search';
import { getWinesFiltered, RootState } from '~/client/store/';
import { MessageManager } from '../MessageManager/MessageManager';

Expand Down
4 changes: 2 additions & 2 deletions client/components/Toolkit/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import styled from 'styled-components';
import CheckBoxIcon from '@material-ui/icons/CheckBox';
import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
import CheckBoxIcon from '@mui/icons-material/CheckBox';
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';

const Input = styled.input`
position: absolute;
Expand Down
6 changes: 3 additions & 3 deletions client/components/Toolkit/Radio.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import styled from 'styled-components';
import RadioButtonCheckedIcon from '@material-ui/icons/RadioButtonChecked';
import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked';
import RadioButtonCheckedIcon from '@mui/icons-material/RadioButtonChecked';
import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';

const Input = styled.input`
position: absolute;
Expand Down Expand Up @@ -33,7 +33,7 @@ type Props = {
className?: string;
};

export const Radio: FC<Props> = ({
export const Radio: FC<React.PropsWithChildren<Props>> = ({
children,
value,
onChange,
Expand Down
2 changes: 1 addition & 1 deletion client/components/Wine/WineCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC, useState } from 'react';
import tinycolor from 'tinycolor2';
import styled from 'styled-components';
import MenuIcon from '@material-ui/icons/Menu';
import MenuIcon from '@mui/icons-material/Menu';
import fontColorContrast from 'font-color-contrast';
import { PICTURE_UPLOAD, wineTypes } from '~/config';

Expand Down
2 changes: 1 addition & 1 deletion e2e/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"env": {
"cypress/globals": true,
"browser": true,
Expand Down
32 changes: 0 additions & 32 deletions index.js

This file was deleted.

5 changes: 4 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
16 changes: 16 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,29 @@ const {
SENTRY_PROJECT,
SENTRY_AUTH_TOKEN,
NODE_ENV,
GITM_PORT,
} = process.env;

module.exports = withSourceMaps({
env: {
GITM_OWNER: process.env.GITM_OWNER,
SENTRY_DSN: process.env.SENTRY_DSN,
},
compiler: {
styledComponents: true,
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: `http://localhost:${GITM_PORT}/api/:path*`,
},
{
source: '/sse',
destination: `http://localhost:${GITM_PORT}/sse`,
},
];
},
webpack: (config, options) => {
// In `pages/_app.js`, Sentry is imported from @sentry/node. While
// @sentry/browser will run in a Node.js environment, @sentry/node will use
Expand Down
Loading

0 comments on commit d77079d

Please sign in to comment.