auto-claude: subtask-1-2 - Create CategoryFilter component
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"base_commands": [
|
||||
".",
|
||||
"[",
|
||||
"[[",
|
||||
"ag",
|
||||
"awk",
|
||||
"basename",
|
||||
"bash",
|
||||
"bc",
|
||||
"break",
|
||||
"cat",
|
||||
"cd",
|
||||
"chmod",
|
||||
"clear",
|
||||
"cmp",
|
||||
"column",
|
||||
"comm",
|
||||
"command",
|
||||
"continue",
|
||||
"cp",
|
||||
"curl",
|
||||
"cut",
|
||||
"date",
|
||||
"df",
|
||||
"diff",
|
||||
"dig",
|
||||
"dirname",
|
||||
"du",
|
||||
"echo",
|
||||
"egrep",
|
||||
"env",
|
||||
"eval",
|
||||
"exec",
|
||||
"exit",
|
||||
"expand",
|
||||
"export",
|
||||
"expr",
|
||||
"false",
|
||||
"fd",
|
||||
"fgrep",
|
||||
"file",
|
||||
"find",
|
||||
"fmt",
|
||||
"fold",
|
||||
"gawk",
|
||||
"gh",
|
||||
"git",
|
||||
"grep",
|
||||
"gunzip",
|
||||
"gzip",
|
||||
"head",
|
||||
"help",
|
||||
"host",
|
||||
"iconv",
|
||||
"id",
|
||||
"jobs",
|
||||
"join",
|
||||
"jq",
|
||||
"kill",
|
||||
"killall",
|
||||
"less",
|
||||
"let",
|
||||
"ln",
|
||||
"ls",
|
||||
"lsof",
|
||||
"man",
|
||||
"mkdir",
|
||||
"mktemp",
|
||||
"more",
|
||||
"mv",
|
||||
"nl",
|
||||
"paste",
|
||||
"pgrep",
|
||||
"ping",
|
||||
"pkill",
|
||||
"popd",
|
||||
"printenv",
|
||||
"printf",
|
||||
"ps",
|
||||
"pushd",
|
||||
"pwd",
|
||||
"read",
|
||||
"readlink",
|
||||
"realpath",
|
||||
"reset",
|
||||
"return",
|
||||
"rev",
|
||||
"rg",
|
||||
"rm",
|
||||
"rmdir",
|
||||
"sed",
|
||||
"seq",
|
||||
"set",
|
||||
"sh",
|
||||
"shuf",
|
||||
"sleep",
|
||||
"sort",
|
||||
"source",
|
||||
"split",
|
||||
"stat",
|
||||
"tail",
|
||||
"tar",
|
||||
"tee",
|
||||
"test",
|
||||
"time",
|
||||
"timeout",
|
||||
"touch",
|
||||
"tr",
|
||||
"tree",
|
||||
"true",
|
||||
"type",
|
||||
"uname",
|
||||
"unexpand",
|
||||
"uniq",
|
||||
"unset",
|
||||
"unzip",
|
||||
"watch",
|
||||
"wc",
|
||||
"wget",
|
||||
"whereis",
|
||||
"which",
|
||||
"whoami",
|
||||
"xargs",
|
||||
"yes",
|
||||
"yq",
|
||||
"zip",
|
||||
"zsh"
|
||||
],
|
||||
"stack_commands": [
|
||||
"ar",
|
||||
"clang",
|
||||
"clang++",
|
||||
"cmake",
|
||||
"composer",
|
||||
"dive",
|
||||
"docker",
|
||||
"docker-buildx",
|
||||
"docker-compose",
|
||||
"dockerfile",
|
||||
"eslint",
|
||||
"g++",
|
||||
"gcc",
|
||||
"ipython",
|
||||
"jupyter",
|
||||
"ld",
|
||||
"make",
|
||||
"meson",
|
||||
"next",
|
||||
"ninja",
|
||||
"nm",
|
||||
"node",
|
||||
"notebook",
|
||||
"npm",
|
||||
"npx",
|
||||
"objdump",
|
||||
"pdb",
|
||||
"php",
|
||||
"pip",
|
||||
"pip3",
|
||||
"pipx",
|
||||
"pnpm",
|
||||
"pnpx",
|
||||
"pudb",
|
||||
"python",
|
||||
"python3",
|
||||
"react-scripts",
|
||||
"strip",
|
||||
"ts-node",
|
||||
"tsc",
|
||||
"tsx",
|
||||
"vitest"
|
||||
],
|
||||
"script_commands": [
|
||||
"bun",
|
||||
"npm",
|
||||
"pnpm",
|
||||
"yarn"
|
||||
],
|
||||
"custom_commands": [],
|
||||
"detected_stack": {
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"php",
|
||||
"c"
|
||||
],
|
||||
"package_managers": [
|
||||
"pnpm"
|
||||
],
|
||||
"frameworks": [
|
||||
"nextjs",
|
||||
"react",
|
||||
"vitest",
|
||||
"eslint"
|
||||
],
|
||||
"databases": [],
|
||||
"infrastructure": [
|
||||
"docker"
|
||||
],
|
||||
"cloud_providers": [],
|
||||
"code_quality_tools": [],
|
||||
"version_managers": []
|
||||
},
|
||||
"custom_scripts": {
|
||||
"npm_scripts": [
|
||||
"dev",
|
||||
"build",
|
||||
"start",
|
||||
"lint",
|
||||
"build:images",
|
||||
"generate:images",
|
||||
"generate:images:dry",
|
||||
"test",
|
||||
"test:coverage"
|
||||
],
|
||||
"make_targets": [],
|
||||
"poetry_scripts": [],
|
||||
"cargo_aliases": [],
|
||||
"shell_scripts": []
|
||||
},
|
||||
"project_dir": "C:\\Users\\damja\\WebstormProjects\\Portfolio",
|
||||
"created_at": "2026-01-22T15:28:38.237190",
|
||||
"project_hash": "c4ad399e16be367eb4e6b076fe1d9ee3",
|
||||
"inherited_from": "C:\\Users\\damja\\WebstormProjects\\Portfolio"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"active": true,
|
||||
"spec": "006-add-portfolio-category-filter",
|
||||
"state": "building",
|
||||
"subtasks": {
|
||||
"completed": 1,
|
||||
"total": 5,
|
||||
"in_progress": 1,
|
||||
"failed": 0
|
||||
},
|
||||
"phase": {
|
||||
"current": "Implementation",
|
||||
"id": null,
|
||||
"total": 5
|
||||
},
|
||||
"workers": {
|
||||
"active": 0,
|
||||
"max": 1
|
||||
},
|
||||
"session": {
|
||||
"number": 3,
|
||||
"started_at": "2026-01-25T06:26:25.448632"
|
||||
},
|
||||
"last_update": "2026-01-25T06:32:27.728571"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"sandbox": {
|
||||
"enabled": true,
|
||||
"autoAllowBashIfSandboxed": true
|
||||
},
|
||||
"permissions": {
|
||||
"defaultMode": "acceptEdits",
|
||||
"allow": [
|
||||
"Read(./**)",
|
||||
"Write(./**)",
|
||||
"Edit(./**)",
|
||||
"Glob(./**)",
|
||||
"Grep(./**)",
|
||||
"Read(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter/**)",
|
||||
"Write(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter/**)",
|
||||
"Edit(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter/**)",
|
||||
"Glob(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter/**)",
|
||||
"Grep(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter/**)",
|
||||
"Read(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter\\.auto-claude\\specs\\006-add-portfolio-category-filter/**)",
|
||||
"Write(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter\\.auto-claude\\specs\\006-add-portfolio-category-filter/**)",
|
||||
"Edit(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude\\worktrees\\tasks\\006-add-portfolio-category-filter\\.auto-claude\\specs\\006-add-portfolio-category-filter/**)",
|
||||
"Read(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude/**)",
|
||||
"Write(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude/**)",
|
||||
"Edit(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude/**)",
|
||||
"Glob(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude/**)",
|
||||
"Grep(C:\\Users\\damja\\WebstormProjects\\Portfolio\\.auto-claude/**)",
|
||||
"Bash(*)",
|
||||
"WebFetch(*)",
|
||||
"WebSearch(*)",
|
||||
"mcp__context7__resolve-library-id(*)",
|
||||
"mcp__context7__get-library-docs(*)",
|
||||
"mcp__graphiti-memory__search_nodes(*)",
|
||||
"mcp__graphiti-memory__search_facts(*)",
|
||||
"mcp__graphiti-memory__add_episode(*)",
|
||||
"mcp__graphiti-memory__get_episodes(*)",
|
||||
"mcp__graphiti-memory__get_entity_edge(*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -81,4 +81,7 @@ supabase/.temp/
|
||||
.history/
|
||||
|
||||
# Source images (originals before optimization)
|
||||
source-images/
|
||||
source-images/
|
||||
|
||||
# Auto Claude data directory
|
||||
.auto-claude/
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
|
||||
const categories = [
|
||||
'AI Development',
|
||||
'IoT',
|
||||
'Full-Stack',
|
||||
'Enterprise Software',
|
||||
'E-Commerce',
|
||||
'Developer Tools',
|
||||
] as const;
|
||||
|
||||
export function CategoryFilter() {
|
||||
const t = useTranslations('portfolio.filters');
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
const selectedCategory = searchParams.get('category');
|
||||
|
||||
const handleCategoryClick = (category: string | null) => {
|
||||
if (category === null) {
|
||||
// Remove category param to show all
|
||||
router.push(window.location.pathname);
|
||||
} else {
|
||||
// Set category param
|
||||
const params = new URLSearchParams(searchParams.toString());
|
||||
params.set('category', category);
|
||||
router.push(`${window.location.pathname}?${params.toString()}`);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mb-12">
|
||||
<div className="flex items-center gap-3 overflow-x-auto pb-4 scrollbar-hide">
|
||||
{/* All button */}
|
||||
<button
|
||||
onClick={() => handleCategoryClick(null)}
|
||||
className={`
|
||||
relative whitespace-nowrap rounded-full py-2 px-4
|
||||
transition-all duration-200 ease-in-out text-sm tracking-wide
|
||||
${!selectedCategory
|
||||
? 'text-white bg-zinc-700/60'
|
||||
: 'text-zinc-400 hover:text-white hover:bg-zinc-800/30'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{t('all')}
|
||||
</button>
|
||||
|
||||
{/* Category buttons */}
|
||||
{categories.map((category) => {
|
||||
const isActive = selectedCategory === category;
|
||||
return (
|
||||
<button
|
||||
key={category}
|
||||
onClick={() => handleCategoryClick(category)}
|
||||
className={`
|
||||
relative whitespace-nowrap rounded-full py-2 px-4
|
||||
transition-all duration-200 ease-in-out text-sm tracking-wide
|
||||
${isActive
|
||||
? 'text-white bg-zinc-700/60'
|
||||
: 'text-zinc-400 hover:text-white hover:bg-zinc-800/30'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{t(`categories.${category}`)}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user