Skip to content

Commit

Permalink
Revert "Merge branch 'main' of https://github.com/cdsctf/cdsuno"
Browse files Browse the repository at this point in the history
This reverts commit 9dacfc3, reversing
changes made to 1b99b6e.
  • Loading branch information
Ec3o committed Nov 22, 2024
1 parent 9dacfc3 commit 4a923fc
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 162 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"nanoid": "^5.0.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.1.2",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.26.1",
"react-transition-group": "^4.4.5",
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useThemeStore } from "@/stores/theme";
import { RouterProvider } from "react-router-dom";
import { ErrorBoundary } from "react-error-boundary";
import { useEffect } from "react";
import { router } from "@/routers";

Expand Down
Empty file.
9 changes: 0 additions & 9 deletions src/components/core/Box/Box.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/core/Box/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/core/Flex/Flex.module.scss

This file was deleted.

29 changes: 0 additions & 29 deletions src/components/core/Flex/Flex.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/core/Flex/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/core/InputBase/InputBase.module.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
@use "@/styles/mixins";

$width: var(--input-width);
$height: var(--input-height);
$bg-color: var(--input-bg-color);
$border-color: var(--input-border-color);

.root {
width: $width;
height: $height;
display: flex;
flex-direction: column;
align-items: start;
Expand Down Expand Up @@ -47,7 +45,6 @@ $border-color: var(--input-border-color);

.wrapper {
width: 100%;
height: 100%;
border-radius: 15px;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
display: flex;
Expand Down
3 changes: 0 additions & 3 deletions src/components/core/InputBase/InputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import clsx from "clsx";

export interface InputBaseProps extends ComponentProps<"div"> {
width?: string;
height?: string;
color?: string;
variant?: "outlined" | "solid";
invalid?: boolean;
Expand All @@ -21,7 +20,6 @@ export const InputBase = forwardRef<HTMLDivElement, InputBaseProps>(
(props, ref) => {
const {
width = "fit-content",
height = "fit-content",
color = "primary",
invalid = false,
variant = "outlined",
Expand All @@ -38,7 +36,6 @@ export const InputBase = forwardRef<HTMLDivElement, InputBaseProps>(

const variables = {
"--input-width": width,
"--input-height": height,
"--input-bg-color": baseColor,
"--input-border-color": baseColor,
} as React.CSSProperties;
Expand Down
5 changes: 0 additions & 5 deletions src/components/core/Stack/Stack.module.scss

This file was deleted.

29 changes: 0 additions & 29 deletions src/components/core/Stack/Stack.tsx

This file was deleted.

Empty file removed src/components/core/Stack/index.ts
Empty file.
1 change: 0 additions & 1 deletion src/components/core/Textarea/Textarea.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
.textarea {
flex: 1;
width: 100%;
height: 100%;
background: transparent;
border: none;
outline: none;
Expand Down
16 changes: 6 additions & 10 deletions src/components/core/Textarea/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ import styles from "./Textarea.module.scss";

export interface TextareaProps extends Omit<InputBaseProps, "onChange"> {
width?: string;
height?: string;
value?: string;
onChange?: (value: string) => void;
icon?: React.ReactElement;
}

export function Textarea(props: TextareaProps) {
const {
width = "fit-content",
height = "fit-content",
value,
onChange,
icon,
...rest
} = props;
const { width = "fit-content", value, onChange, icon, ...rest } = props;

return (
<InputBase className={styles["root"]} width={width}>
{icon && <Icon icon={icon} className={styles["icon"]} />}
{icon && (
<div className={styles["icon"]}>
<Icon icon={icon} />
</div>
)}
<textarea
className={styles["textarea"]}
value={value}
Expand Down
26 changes: 0 additions & 26 deletions src/components/utils/ErrorFallback/ErrorFallback.module.scss

This file was deleted.

31 changes: 0 additions & 31 deletions src/components/utils/ErrorFallback/ErrorFallback.tsx

This file was deleted.

Empty file.
8 changes: 2 additions & 6 deletions src/layouts/Base/Base.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { ErrorFallback } from "@/components/utils/ErrorFallback/ErrorFallback";
import { Toaster } from "@/components/widgets/Toaster";
import globalRouter from "@/utils/globalRouter";
import { ErrorBoundary } from "react-error-boundary";
import { Outlet, useNavigate } from "react-router-dom";

export function Base() {
Expand All @@ -10,10 +8,8 @@ export function Base() {

return (
<>
<ErrorBoundary FallbackComponent={ErrorFallback}>
<Outlet />
<Toaster />
</ErrorBoundary>
<Outlet />
<Toaster />
</>
);
}
2 changes: 0 additions & 2 deletions src/pages/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export function Page() {

const [checked, setChecked] = useState<boolean>(false);

// throw new Error("123");

const markdownText = `
# welcome Heading1
## welcome Heading2
Expand Down

0 comments on commit 4a923fc

Please sign in to comment.