Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 41 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"recharts": "^2.15.3",
"supabase": "^2.95.5",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
"web-vitals": "^2.1.4",
"yaml": "^2.9.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down Expand Up @@ -63,4 +64,4 @@
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
}
}
}
5 changes: 4 additions & 1 deletion src/components/layout/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function MainLayout({ openDrawer, children }: Props) {
width: '6em',
cursor: 'pointer',
alignItems: 'center',
justifyContent: 'center',
position: 'relative',
'&::after': {
content: '""',
Expand All @@ -35,7 +36,9 @@ export default function MainLayout({ openDrawer, children }: Props) {
}}
className="desktop-bar"
onClick={() => openDrawer()}
/>
>
(Ctrl + D)
</Stack>

<Stack className="main" direction="column" sx={{ width: '100%', minHeight: '100%', height: '100%', justifyContent: 'start', alignItems: 'center', overflowY: 'scroll', position: 'relative' }}>
{children}
Expand Down
5 changes: 3 additions & 2 deletions src/components/layout/SidebarDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Drawer, ModalClose, DialogTitle, DialogContent, Select, Option, Stack, Box, Button } from '@mui/joy';
import { Drawer, ModalClose, DialogTitle, DialogContent, Select, Option, Stack, Box, Button, Typography } from '@mui/joy';
import CategoryList from '../CategoryList';
import CustomSearch from '../ProblemSearch';
import ProblemList from '../ProblemList';
Expand Down Expand Up @@ -52,7 +52,8 @@ export default function SidebarDrawer({
<DialogTitle level="h1" sx={{ fontFamily: '"Silkscreen", monospace', padding: '5px', fontSize: '30pt' }}>
Coding Cat
</DialogTitle>
<Stack marginRight="5em" direction="row" gap={3} className="problemList-search-filter">
<Stack marginRight="5em" alignItems="center" direction="row" gap={3} className="problemList-search-filter">
<Typography level="body-md">Use the Arrow Keys to navigate and Enter to select</Typography>
<Select sx={{ width: '150px', fontWeight: 'normal', fontFamily: 'Silkscreen' }} placeholder="Difficulty" value={difficulty} onChange={(e, newValue) => setDifficulty(newValue || '')}>
<Option sx={{ fontFamily: 'Silkscreen' }} value="all">All</Option>
<Option sx={{ fontFamily: 'Silkscreen' }} value="easy">Easy</Option>
Expand Down
2 changes: 1 addition & 1 deletion src/private-problems
5 changes: 3 additions & 2 deletions src/routes/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import AppHeader from '../components/layout/AppHeader';
import sortProblems from '../utils/sortProblems';
import { categorizeCategories } from '../utils/categorizeCategories';
import { getCategoryListOrdered } from '../utils/getCategoryListOrdered';
import { getOrderedBlogPosts } from '../utils/blogs/getOrderedBlogPosts';

export default function App() {
const problems = useLoaderData() as Problem[];
Expand Down Expand Up @@ -203,12 +204,12 @@ export default function App() {
else {
if (activeCategory === 'blogs') {
// navigating through blog posts
const blogSlugs = searchedBlogs
const blogSlugs = getOrderedBlogPosts(searchedBlogs
.filter(b => {
// filters by selectedTab if there are any
return availableTabs.length > 0
&& b.meta.category === selectedTab.toLowerCase();
})
}))
.map(b => b.meta.blog_slug);
// up / down selects blog post
if (event.key === "ArrowUp") {
Expand Down
Loading