Skip to content

Commit

Permalink
lint everything
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Mar 9, 2024
1 parent f99f500 commit 0456451
Show file tree
Hide file tree
Showing 15 changed files with 322 additions and 323 deletions.
84 changes: 42 additions & 42 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { MantineProvider } from "@mantine/core";
import { ModalsProvider } from "@mantine/modals";
import { Notifications } from "@mantine/notifications";
import { SessionContextProvider } from "@supabase/auth-helpers-react";
import { createClient } from "@supabase/supabase-js";
import { PostHogProvider } from "posthog-js/react";
import React from "react";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import "./App.css";
import LoadingOverlay from "./components/LoadingOverlay/LoadingOverlay";
import OAuthUser from "./components/OAuthUser";
import constants from "./constants/constants";
import Error404 from "./pages/404/Error404";
import FriendProfile from "./pages/app/FriendProfile";
import RoomLayout from "./pages/app/Room/index";
import Root from "./pages/app/root";
import UserPreferences from "./pages/app/UserPreferences/UserPreferences";
import UserProfile from "./pages/app/UserProfile";
import Tos from "./pages/app/TOS";
import { MantineProvider } from "@mantine/core"
import { ModalsProvider } from "@mantine/modals"
import { Notifications } from "@mantine/notifications"
import { SessionContextProvider } from "@supabase/auth-helpers-react"
import { createClient } from "@supabase/supabase-js"
import { PostHogProvider } from "posthog-js/react"
import React from "react"
import { createBrowserRouter, RouterProvider } from "react-router-dom"
import "./App.css"
import LoadingOverlay from "./components/LoadingOverlay/LoadingOverlay"
import OAuthUser from "./components/OAuthUser"
import constants from "./constants/constants"
import Error404 from "./pages/404/Error404"
import FriendProfile from "./pages/app/FriendProfile"
import RoomLayout from "./pages/app/Room/index"
import Root from "./pages/app/root"
import UserPreferences from "./pages/app/UserPreferences/UserPreferences"
import UserProfile from "./pages/app/UserProfile"
import Tos from "./pages/app/TOS"

const supabase = createClient(
constants.supabaseUrl || "",
constants.supabaseAnonKey || ""
);
)

const router = createBrowserRouter([
{
Expand All @@ -31,31 +31,31 @@ const router = createBrowserRouter([
children: [
{
path: "/chat/:roomId",
element: <RoomLayout />,
element: <RoomLayout />
},
{
path: "/account",
element: <UserPreferences />,
element: <UserPreferences />
},
{
path: "/profile",
element: <UserProfile />,
element: <UserProfile />
},
{
path: "/friend",
element: <FriendProfile />,
},
],
element: <FriendProfile />
}
]
},
{
path: "/tos",
element: <Tos />,
element: <Tos />
},
{
path: "/login",
element: <OAuthUser />,
},
]);
element: <OAuthUser />
}
])

const App = (): JSX.Element => {
return (
Expand All @@ -77,20 +77,20 @@ const App = (): JSX.Element => {
"#202020",
"#1a1a1a",
"#141414",
"#111111",
],
"#111111"
]
},
components: {
Button: {
defaultProps: {
size: "xs",
color: "blue",
},
},
color: "blue"
}
}
},
fontSizes: {
xxl: "1.75rem",
"2xl": "2.25rem",
"2xl": "2.25rem"
},
spacing: {
xxl: "1.75rem",
Expand All @@ -100,15 +100,15 @@ const App = (): JSX.Element => {
"5xl": "5rem",
"6xl": "6rem",
"7xl": "7rem",
"8xl": "8rem",
},
"8xl": "8rem"
}
}}
withGlobalStyles
>
<PostHogProvider
apiKey={constants.posthogApiKey}
options={{
api_host: "https://app.posthog.com",
api_host: "https://app.posthog.com"
}}
>
<Notifications />
Expand All @@ -119,7 +119,7 @@ const App = (): JSX.Element => {
</PostHogProvider>
</MantineProvider>
</SessionContextProvider>
);
};
)
}

export default App;
export default App
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ import {
Text,
rem,
Box,
useMantineTheme,
} from "@mantine/core";
import React from "react";
import { useNavigate } from "react-router";
import iconImgSrc from "../../../../public/icons/account.svg";
import { getAvatarImage } from "../../../helpers/getAvatarImage";
import useGlobalStore from "../../../store/useGlobalStore";
import UserAvatar from "../../UserAvatar";
import useSideMenuStyles from "./MobileSideMenustyles";
import FriendsSideMenuScreen from "../SideMenuScreens/FriendsSideMenuScreen";
useMantineTheme
} from "@mantine/core"
import React from "react"
import { useNavigate } from "react-router"
import iconImgSrc from "../../../../public/icons/account.svg"
import { getAvatarImage } from "../../../helpers/getAvatarImage"
import useGlobalStore from "../../../store/useGlobalStore"
import UserAvatar from "../../UserAvatar"
import useSideMenuStyles from "./MobileSideMenustyles"
import FriendsSideMenuScreen from "../SideMenuScreens/FriendsSideMenuScreen"

const MobileSideMenu = ({
closeMenu,
closeMenu
}: {
closeMenu: () => void;
closeMenu: () => void
}): JSX.Element => {
const { classes } = useSideMenuStyles();
const theme = useMantineTheme();
const navigate = useNavigate();
const { user } = useGlobalStore();
const { classes } = useSideMenuStyles()
const theme = useMantineTheme()
const navigate = useNavigate()
const { user } = useGlobalStore()

return (
<Navbar className={classes.container}>
Expand Down Expand Up @@ -61,7 +61,7 @@ const MobileSideMenu = ({
</Group>
<Group
style={{
textAlign: "center",
textAlign: "center"
}}
>
<Button
Expand All @@ -72,11 +72,11 @@ const MobileSideMenu = ({
alignItems: "center",
backgroundColor: "#292929",
paddingLeft: rem(20),
color: "#757474",
color: "#757474"
}}
onClick={() => {
navigate("/profile");
closeMenu();
navigate("/profile")
closeMenu()
}}
>
<Text mr={"md"}>My Account</Text>
Expand All @@ -94,7 +94,7 @@ const MobileSideMenu = ({
</div>
</Navbar.Section>
</Navbar>
);
};
)
}

export default MobileSideMenu;
export default MobileSideMenu
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createStyles } from "@mantine/core";
import { createStyles } from "@mantine/core"

const useSideMenuStyles = createStyles((theme) => ({
wrapper: {
display: "flex",
width: "100%",
width: "100%"
},

aside: {
Expand All @@ -15,7 +15,7 @@ const useSideMenuStyles = createStyles((theme) => ({
borderRight: `1px solid ${
theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]
}`,
padding: 5,
padding: 5
},
container: {
boxSizing: "border-box",
Expand All @@ -32,19 +32,19 @@ const useSideMenuStyles = createStyles((theme) => ({
color: "#ffffff",
width: "100%",
"@media (min-width: 1024px)": {
display: "none",
},
display: "none"
}
},
main: {
flex: 1,
backgroundColor:
theme.colorScheme === "dark"
? theme.colors.dark[8]
: theme.colors.gray[0],
: theme.colors.gray[0]
},
linkContainer: {
maxHeight: "calc(100vh - 100px)",
overflowY: "auto",
overflowY: "auto"
},
mainLink: {
width: 44,
Expand All @@ -62,19 +62,19 @@ const useSideMenuStyles = createStyles((theme) => ({
backgroundColor:
theme.colorScheme === "dark"
? theme.colors.dark[5]
: theme.colors.gray[0],
},
: theme.colors.gray[0]
}
},

mainLinkActive: {
"&, &:hover": {
backgroundColor: theme.fn.variant({
variant: "light",
color: theme.primaryColor,
color: theme.primaryColor
}).background,
color: theme.fn.variant({ variant: "light", color: theme.primaryColor })
.color,
},
.color
}
},

title: {
Expand All @@ -91,7 +91,7 @@ const useSideMenuStyles = createStyles((theme) => ({
height: 60,
borderBottom: `1px solid ${
theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]
}`,
}`
},

logo: {
Expand All @@ -104,13 +104,13 @@ const useSideMenuStyles = createStyles((theme) => ({
borderBottom: `1px solid ${
theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[3]
}`,
marginBottom: theme.spacing.xl,
marginBottom: theme.spacing.xl
},
newRoomButton: {
width: "calc(100% - 20px)",
margin: 10,
marginTop: 0,
marginBottom: 20,
marginBottom: 20
},
link: {
boxSizing: "border-box",
Expand All @@ -133,23 +133,23 @@ const useSideMenuStyles = createStyles((theme) => ({
theme.colorScheme === "dark"
? theme.colors.dark[5]
: theme.colors.gray[1],
color: theme.colorScheme === "dark" ? theme.white : theme.black,
},
color: theme.colorScheme === "dark" ? theme.white : theme.black
}
},

linkActive: {
"&, &:hover": {
borderLeftColor: theme.fn.variant({
variant: "filled",
color: theme.primaryColor,
color: theme.primaryColor
}).background,
backgroundColor: theme.fn.variant({
variant: "filled",
color: theme.primaryColor,
color: theme.primaryColor
}).background,
color: theme.white,
},
},
}));
color: theme.white
}
}
}))

export default useSideMenuStyles;
export default useSideMenuStyles
Loading

0 comments on commit 0456451

Please sign in to comment.