Skip to content

Commit

Permalink
rework imports; disable babel.config.json for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mimecuvalo committed Mar 3, 2023
1 parent fd976d2 commit 19a939e
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 21 deletions.
3 changes: 2 additions & 1 deletion components/Editor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Alert, Skeleton, Snackbar, styled } from '@mui/material';
import { Alert, Skeleton, Snackbar } from '@mui/material';
import { ClipboardEvent, Suspense, lazy, useState } from 'react';

import { styled } from '@mui/material/styles';
import uploadFileToS3 from 'util/s3';

const HelloWorldEditor = lazy(() => import('hello-world-editor'));
Expand Down
2 changes: 1 addition & 1 deletion components/FeedWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from '@mui/material';
import { styled } from '@mui/material/styles';

const FeedWrapper = styled('div', { label: 'FeedWrapper' })`
width: calc(33% - ${(props) => props.theme.spacing(2)});
Expand Down
2 changes: 1 addition & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Suspense, lazy, memo, useEffect, useState } from 'react';

import Help from './Help';
import { styled } from '@mui/material';
import { styled } from '@mui/material/styles';

const Debug = lazy(() => import('components/internal/Debug'));

Expand Down
2 changes: 1 addition & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Login from './Login';
import { styled } from '@mui/material';
import { styled } from '@mui/material/styles';

const StyledHeader = styled('header')`
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion components/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@mui/material';
import { F, defineMessages, useIntl } from 'i18n';
import { MouseEvent, useEffect, useState } from 'react';
import { styled, useTheme } from '@mui/material';
import { styled, useTheme } from '@mui/material/styles';

import { $Experiment } from 'app/experiments';
import Cookies from 'js-cookie';
Expand Down
2 changes: 1 addition & 1 deletion components/ItemWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropsWithChildren } from 'react';
import { styled } from '@mui/material';
import { styled } from '@mui/material/styles';

const StyledItemWrapper = styled('div', { label: 'ItemWrapper' })`
padding-bottom: 0;
Expand Down
3 changes: 2 additions & 1 deletion components/content/ContentBase.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Content, UserPublic } from 'data/graphql-generated';
import { CssBaseline, GlobalStyles, ThemeProvider } from '@mui/material';
import { CssBaseline, GlobalStyles } from '@mui/material';
import { Grid, Typography, styled } from 'components';
import { themeGlobalCss, themes } from 'styles/theme';

import ContentHead from './ContentHead';
import { PropsWithChildren } from 'react';
import SiteMap from './SiteMap';
import { ThemeProvider } from '@mui/material/styles';

const Container = styled('div', { label: 'ContentBaseContainer' })`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion components/content/ContentHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { buildUrl, contentUrl, profileUrl } from 'util/url-factory';

import Head from 'next/head';
import { themes } from 'styles/theme';
import { useTheme } from '@mui/material';
import { useTheme } from 'components';

export default function ContentHead(props: {
content?: Content;
Expand Down
2 changes: 1 addition & 1 deletion components/content/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Content, ContentMetaInfo } from 'data/graphql-generated';
import { Link, styled } from 'components';
import { Palette, PaletteColor, useTheme } from '@mui/material';
import { Palette, PaletteColor, useTheme } from '@mui/material/styles';
import { gql, useQuery } from '@apollo/client';

import ContentLink from 'components/ContentLink';
Expand Down
3 changes: 1 addition & 2 deletions components/content/SiteMap.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Avatar, Box, IconButton, Link, TextField, styled } from 'components';
import { Avatar, Box, IconButton, Link, TextField, styled, useTheme } from 'components';
import { Content, SiteMapAndUserQuery } from 'data/graphql-generated';
import { F, defineMessages, useIntl } from 'i18n';
import { FormEvent, ReactNode, useContext, useEffect, useState } from 'react';
Expand All @@ -15,7 +15,6 @@ import baseTheme from 'styles';
import constants from 'util/constants';
import { transientOptions } from 'util/css';
import { useRouter } from 'next/router';
import { useTheme } from '@mui/material';

export const SITE_MAP_WIDTH = 175;

Expand Down
3 changes: 2 additions & 1 deletion components/dashboard/DashboardEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ import {
Snackbar,
Toolbar,
styled,
useTheme,
} from 'components';
import { F, defineMessages, useIntl } from 'i18n';
import { SelectChangeEvent, useTheme } from '@mui/material';
import { gql, useMutation, useQuery } from '@apollo/client';
import { useEffect, useState } from 'react';

import { ArrowDropDown } from '@mui/icons-material';
import Cookies from 'js-cookie';
import Editor from 'components/Editor';
import { SelectChangeEvent } from '@mui/material';
import { SiteMapAndUserEditorQuery } from 'data/graphql-generated';
import baseTheme from 'styles';
import mime from 'mime/lite';
Expand Down
3 changes: 1 addition & 2 deletions components/dashboard/actions/NewFeed.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MenuItem, TextField } from 'components';
import { MenuItem, TextField, useTheme } from 'components';
import { defineMessages, useIntl } from 'i18n';
import { gql, useMutation } from '@apollo/client';

Expand All @@ -8,7 +8,6 @@ import FollowingFeedCountsQuery from 'components/dashboard/FollowingFeedCountsQu
import FollowingQuery from 'components/dashboard/FollowingQuery';
import FollowingSpecialFeedCountsQuery from 'components/dashboard/FollowingSpecialFeedCountsQuery';
import { UserRemotePublic } from 'data/graphql-generated';
import { useTheme } from '@mui/material';

const messages = defineMessages({
error: { defaultMessage: 'Error subscribing to new feed.' },
Expand Down
3 changes: 2 additions & 1 deletion components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export {
Toolbar,
Tooltip,
Typography,
styled,
} from '@mui/material';

export { useTheme, styled } from '@mui/material/styles';

export { default as FeedWrapper } from './FeedWrapper';
export { default as Footer } from './Footer';
export { default as Header } from './Header';
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion pages/[[...slug]].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Comment, ContentAndUserQuery, Content as ContentType, Favorite, UserPublic } from 'data/graphql-generated';
import { CssBaseline, GlobalStyles, ThemeProvider } from '@mui/material';
import { CssBaseline, GlobalStyles } from '@mui/material';
import { addApolloState, initializeApollo } from 'app/apollo';
import { buildUrl, contentUrl } from 'util/url-factory';
import { themeGlobalCss, themes } from 'styles/theme';
Expand All @@ -15,6 +15,7 @@ import Nav from 'components/content/Nav';
import NotFound from 'pages/404';
import Simple from 'components/content/templates/Simple';
import SwipeListener from 'swipe-listener';
import { ThemeProvider } from '@mui/material/styles';
import { styled } from 'components';
import { useQuery } from '@apollo/client';
import { useRouter } from 'next/router';
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { CssBaseline } from '@mui/material';
import ErrorBoundary from 'components/error/ErrorBoundary';
import { F } from 'i18n';
import Head from 'next/head';
import { ThemeProvider } from '@mui/material';
import { ThemeProvider } from '@mui/material/styles';
import UserContext from 'app/UserContext';
import { UserPrivate } from 'data/graphql-generated';
import { UserProvider } from '@auth0/nextjs-auth0';
Expand Down
3 changes: 1 addition & 2 deletions pages/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Close as CloseIcon, Menu as MenuIcon } from '@mui/icons-material';
import { Grid, IconButton, styled } from 'components';
import { Grid, IconButton, styled, useTheme } from 'components';
import { defineMessages, useIntl } from 'i18n';
import { useContext, useState } from 'react';

Expand All @@ -15,7 +15,6 @@ import { UserRemotePublic } from 'data/graphql-generated';
import authServerSideProps from 'app/authServerSideProps';
import baseTheme from 'styles';
import { transientOptions } from 'util/css';
import { useTheme } from '@mui/material';

const NAV_WIDTH = '235px';
const MOBILE_NAV_WIDTH = '45px';
Expand Down
2 changes: 1 addition & 1 deletion styles/components.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SimplePaletteColorOptions, createTheme } from '@mui/material';
import { SimplePaletteColorOptions, createTheme } from '@mui/material/styles';

import palette from './palette';
import typography from './typography';
Expand Down
2 changes: 1 addition & 1 deletion styles/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { breakpoints, shape } from './constants';

import components from './components';
import createCache from '@emotion/cache';
import { createTheme } from '@mui/material';
import { createTheme } from '@mui/material/styles';
import flowersComponents from './flowers/components';
import flowersGlobalCss from './flowers/globals';
import flowersPalette from './flowers/palette';
Expand Down

1 comment on commit 19a939e

@vercel
Copy link

@vercel vercel bot commented on 19a939e Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.