Skip to content

Commit 60a5843

Browse files
authored
Fix some minor bug (#3)
* fix: 🐛 fix icon selected not blue by adding parentheses * fix: 🎨 use p instead of text so that vite stop complaining :D
1 parent 2b86c19 commit 60a5843

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/components/CloudConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function CloudConfig() {
1717
return (
1818
<>
1919
<div className="">
20-
<text className="italic c-gray">Make sure the CORS permission is configured properly in your cloud storage provider</text>
20+
<p className="italic c-gray">Make sure the CORS permission is configured properly in your cloud storage provider</p>
2121
<div >
2222
<h2 className="text-center">AWS S3</h2>
2323
<TextInput

src/components/Sidebar.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { CloudConfig } from "./CloudConfig";
55

66
// unresolved problem:
77
// - icon is not rounded
8-
// - active tab acon is not blue
98

109
const mainTabData = [
1110
{ icon: "i-tabler-info-circle", label: 'About' },
@@ -16,7 +15,7 @@ const mainTabData = [
1615

1716
const activeTabAtom = atom("About")
1817

19-
function switchTab() {
18+
function SwitchTab() {
2019
const activeTab = useAtomValue(activeTabAtom)
2120
switch (activeTab) {
2221
case "About": return <About />
@@ -38,7 +37,7 @@ export function Sidebar() {
3837
>
3938
<UnstyledButton
4039
onClick={() => setActiveTab(tab.label)}
41-
className={"size-7 rounded-5 flex flex-items-center flex-justify-center " + tab.label === activeTab ? " c-blue-5 bg-blue-1" : " hover:bg-gray-2"}
40+
className={"size-7 rounded-5 flex flex-items-center flex-justify-center " + (tab.label === activeTab ? " c-blue-5 bg-blue-1" : " hover:bg-gray-2")}
4241
data-active={tab.label === activeTab || undefined}
4342
>
4443
<div className={tab.icon + " m-1 rounded"} style={{ width: rem(22), height: rem(22) }} />
@@ -62,7 +61,7 @@ export function Sidebar() {
6261
</Title>
6362

6463
<div className="p2">
65-
{switchTab()}
64+
{SwitchTab()}
6665
</div>
6766

6867
</div>

0 commit comments

Comments
 (0)