Skip to content

Commit 9397714

Browse files
committed
client: remove the usage of recoil
1 parent dbc1224 commit 9397714

File tree

9 files changed

+18
-78
lines changed

9 files changed

+18
-78
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ With this site, you can customize your card with a live preview.
4141
<img src="./docs/demo-site-2.png" alt="">
4242

4343
> **Warning**
44-
> If the site doesn't load and displays a full white screen, try it in incognito mode.
44+
> If the site doesn't load and displays a full white screen, try it in incognito mode, or clear your browser's cache.
4545
4646
<hr>
4747

client/build/asset-manifest.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.2e163b51.js renamed to client/build/static/js/main.384a4c78.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/build/static/js/main.2e163b51.js.map renamed to client/build/static/js/main.384a4c78.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"react-icons": "^4.6.0",
1515
"react-scripts": "5.0.1",
1616
"react-syntax-highlighter": "^15.5.0",
17-
"recoil": "^0.7.6",
1817
"typescript": "^4.9.3"
1918
},
2019
"scripts": {

client/src/atoms.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

client/src/sections/Options.tsx

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@ import { VscSettings } from "react-icons/vsc";
33
import { IoHammerOutline } from "react-icons/io5";
44
import SelectInput from "../components/input/SelectInput";
55
import GreenButton from "../components/buttons/GreenButton";
6-
import { useRecoilState } from "recoil";
7-
import {
8-
alignState,
9-
borderRadiusState,
10-
borderState,
11-
fontSizeState,
12-
fontWeightState,
13-
lineCountState,
14-
linesState,
15-
themeState,
16-
titleState,
17-
} from "../atoms";
186
import { FC, useCallback, useEffect, useState } from "react";
197
import LineInput from "../components/input/LineInput";
208
import { Line } from "../types/line";
@@ -33,15 +21,15 @@ const Options: FC<OptionsProps> = (props) => {
3321
const themes = useFetchThemes();
3422
const [lineChars, setLineChars] = useState(["1"]);
3523

36-
const [title, setTitle] = useRecoilState<string>(titleState);
37-
const [lineCount, setLineCount] = useRecoilState<string>(lineCountState);
38-
const [theme, setTheme] = useRecoilState(themeState);
39-
const [align, setAlign] = useRecoilState(alignState);
40-
const [lines, setLines] = useRecoilState(linesState);
41-
const [showBorder, setShowBorder] = useRecoilState(borderState);
42-
const [borderRadius, setBorderRadius] = useRecoilState(borderRadiusState);
43-
const [fontWeight, setFontWeight] = useRecoilState(fontWeightState);
44-
const [fontSize, setFontSize] = useRecoilState(fontSizeState);
24+
const [title, setTitle] = useState<string>("My Tech Stack");
25+
const [lineCount, setLineCount] = useState<string>("1");
26+
const [theme, setTheme] = useState<string>("github");
27+
const [align, setAlign] = useState<string>("left");
28+
const [lines, setLines] = useState<Line[]>([]);
29+
const [showBorder, setShowBorder] = useState(true);
30+
const [borderRadius, setBorderRadius] = useState<string>("4.5");
31+
const [fontWeight, setFontWeight] = useState<string>("semibold");
32+
const [fontSize, setFontSize] = useState<string>("18");
4533

4634
useEffect(() => {
4735
// create an array with the numbers of lineCount to 1

0 commit comments

Comments
 (0)