aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-frontend/src
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-17 03:08:30 +0100
committerGravatar Joe Banks <[email protected]>2024-08-17 03:08:30 +0100
commit6ab76981eaa55d6991a19ed883c9abcc20b88e29 (patch)
tree7b4b5dc7271e3ceeaf569e9ab3b441f96440c88a /thallium-frontend/src
parentCorrect bad copy & paste (diff)
Increase linting strictness
Diffstat (limited to 'thallium-frontend/src')
-rw-r--r--thallium-frontend/src/App.tsx18
-rw-r--r--thallium-frontend/src/components/Card.tsx2
-rw-r--r--thallium-frontend/src/components/Header.tsx2
-rw-r--r--thallium-frontend/src/main.tsx12
-rw-r--r--thallium-frontend/src/pages/ErrorPage.tsx14
-rw-r--r--thallium-frontend/src/pages/LandingPage.tsx2
-rw-r--r--thallium-frontend/src/styled-components.d.ts2
-rw-r--r--thallium-frontend/src/themes.ts24
8 files changed, 38 insertions, 38 deletions
diff --git a/thallium-frontend/src/App.tsx b/thallium-frontend/src/App.tsx
index 0aab74b..f4e18d2 100644
--- a/thallium-frontend/src/App.tsx
+++ b/thallium-frontend/src/App.tsx
@@ -1,16 +1,16 @@
-import styled, { createGlobalStyle, ThemeProvider } from 'styled-components';
-import { useEffect, useState } from 'react';
+import styled, { createGlobalStyle, ThemeProvider } from "styled-components";
+import { useEffect, useState } from "react";
import {
createBrowserRouter,
RouterProvider,
} from "react-router-dom";
-import themes from './themes';
+import themes from "./themes";
import Header from "./components/Header";
-import LandingPage from "./pages/LandingPage"
-import ErrorPage from "./pages/ErrorPage"
+import LandingPage from "./pages/LandingPage";
+import ErrorPage from "./pages/ErrorPage";
const GlobalStyle = createGlobalStyle`
@@ -47,7 +47,7 @@ const AppContainer = styled.div`
const BodySeparator = styled.div`
flex-grow: 1;
-`
+`;
const ContentContainer = styled.div`
padding: 1rem;
@@ -68,7 +68,7 @@ function App() {
const theme = isDarkMode ? themes.dark : themes.light;
useEffect(() => {
- const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
setIsDarkMode(prefersDark);
}, []);
@@ -92,7 +92,7 @@ function App() {
</div>
</AppContainer>
</ThemeProvider>
- )
+ );
}
-export default App
+export default App;
diff --git a/thallium-frontend/src/components/Card.tsx b/thallium-frontend/src/components/Card.tsx
index f5b8c13..4f967d0 100644
--- a/thallium-frontend/src/components/Card.tsx
+++ b/thallium-frontend/src/components/Card.tsx
@@ -1,4 +1,4 @@
-import styled from 'styled-components';
+import styled from "styled-components";
const CardContainer = styled.div`
border: 3px solid ${({ theme }) => theme.borderColor};
diff --git a/thallium-frontend/src/components/Header.tsx b/thallium-frontend/src/components/Header.tsx
index 2b6fda4..58e5636 100644
--- a/thallium-frontend/src/components/Header.tsx
+++ b/thallium-frontend/src/components/Header.tsx
@@ -1,4 +1,4 @@
-import styled from 'styled-components';
+import styled from "styled-components";
const HeaderContainer = styled.header`
display: flex;
diff --git a/thallium-frontend/src/main.tsx b/thallium-frontend/src/main.tsx
index 2c50286..d063333 100644
--- a/thallium-frontend/src/main.tsx
+++ b/thallium-frontend/src/main.tsx
@@ -1,11 +1,11 @@
-import { StrictMode } from 'react'
-import { createRoot } from 'react-dom/client'
-import App from './App.tsx'
-import '@fontsource-variable/fira-code';
+import { StrictMode } from "react";
+import { createRoot } from "react-dom/client";
+import App from "./App.tsx";
+import "@fontsource-variable/fira-code";
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-createRoot(document.getElementById('root')!).render(
+createRoot(document.getElementById("root")!).render(
<StrictMode>
<App />
</StrictMode>,
-)
+);
diff --git a/thallium-frontend/src/pages/ErrorPage.tsx b/thallium-frontend/src/pages/ErrorPage.tsx
index 916abc5..96955b6 100644
--- a/thallium-frontend/src/pages/ErrorPage.tsx
+++ b/thallium-frontend/src/pages/ErrorPage.tsx
@@ -1,28 +1,28 @@
-import { useRouteError, isRouteErrorResponse } from 'react-router-dom';
+import { useRouteError, isRouteErrorResponse } from "react-router-dom";
-import Card from '../components/Card';
+import Card from "../components/Card";
const ErrorPage = () => {
const error = useRouteError();
- let title = 'Unexpected Error', message, isUnexpected = false;
+ let title = "Unexpected Error", message, isUnexpected = false;
if (isRouteErrorResponse(error)) {
if (error.status === 404) {
- title = 'Not Found';
- message = 'The requested page could not be found.';
+ title = "Not Found";
+ message = "The requested page could not be found.";
} else {
message = error.statusText;
}
} else if (error instanceof Error) {
message = error.message;
isUnexpected = true;
- } else if (typeof error === 'string') {
+ } else if (typeof error === "string") {
message = error;
isUnexpected = true;
} else {
console.error(error);
- message = 'Unknown error';
+ message = "Unknown error";
isUnexpected = true;
}
diff --git a/thallium-frontend/src/pages/LandingPage.tsx b/thallium-frontend/src/pages/LandingPage.tsx
index da67b42..526f590 100644
--- a/thallium-frontend/src/pages/LandingPage.tsx
+++ b/thallium-frontend/src/pages/LandingPage.tsx
@@ -1,4 +1,4 @@
-import Card from '../components/Card';
+import Card from "../components/Card";
const LandingPage = () => {
return (
diff --git a/thallium-frontend/src/styled-components.d.ts b/thallium-frontend/src/styled-components.d.ts
index d6527d3..5d022f6 100644
--- a/thallium-frontend/src/styled-components.d.ts
+++ b/thallium-frontend/src/styled-components.d.ts
@@ -1,4 +1,4 @@
-import type { Theme } from './themes';
+import type { Theme } from "./themes";
declare module "styled-components" {
export interface DefaultTheme extends Theme { }
diff --git a/thallium-frontend/src/themes.ts b/thallium-frontend/src/themes.ts
index 010300e..92a8597 100644
--- a/thallium-frontend/src/themes.ts
+++ b/thallium-frontend/src/themes.ts
@@ -14,20 +14,20 @@ interface ThemesStore {
const themes: ThemesStore = {
light: {
- backgroundColor: '#f0f0f0',
- textColor: '#000',
- borderColor: '#ccc',
- linkColor: '#7272ff',
- cardBackgroundColor: '#ebebeb',
- cardShadow: '#d0d0d0',
+ backgroundColor: "#f0f0f0",
+ textColor: "#000",
+ borderColor: "#ccc",
+ linkColor: "#7272ff",
+ cardBackgroundColor: "#ebebeb",
+ cardShadow: "#d0d0d0",
},
dark: {
- backgroundColor: '#333',
- textColor: '#fff',
- borderColor: '#949494',
- linkColor: '#8f8fff',
- cardBackgroundColor: '#2c2c2c',
- cardShadow: '#242323',
+ backgroundColor: "#333",
+ textColor: "#fff",
+ borderColor: "#949494",
+ linkColor: "#8f8fff",
+ cardBackgroundColor: "#2c2c2c",
+ cardShadow: "#242323",
},
};