Skip to content

Commit fa0a08d

Browse files
authored
Merge pull request #33 from database-playground/pan93412/dbp-124-記住「挑戰題目」的篩選設定
DBP-124: 記住「挑戰題目」的篩選設定
2 parents fdf706b + 5731389 commit fa0a08d

File tree

3 files changed

+195
-186
lines changed

3 files changed

+195
-186
lines changed

app/(app)/challenges/_components/questions-list.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { graphql } from "@/gql";
1111
import { QuestionDifficulty, type QuestionWhereInput } from "@/gql/graphql";
1212
import { getQuestionSolvedStatus, type SolvedStatus } from "@/lib/solved-status";
1313
import { useSuspenseQuery } from "@apollo/client/react";
14+
import { useLocalStorage } from "foxact/use-local-storage";
1415
import FilterSection from "./filter";
1516

1617
export const LIST_QUESTIONS = graphql(`
@@ -33,7 +34,7 @@ export const LIST_QUESTIONS = graphql(`
3334

3435
export default function QuestionsList() {
3536
const [search, setSearch] = useState<string>("");
36-
const [tags, setTags] = useState<TagState>({
37+
const [tags, setTags] = useLocalStorage<TagState>("question-list:tags", {
3738
solvedStatus: ["solved", "unsolved", "not-tried"],
3839
difficulty: [
3940
QuestionDifficulty.Easy,

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"format:check": "dprint check"
1515
},
1616
"dependencies": {
17-
"@ai-sdk/anthropic": "^2.0.35",
18-
"@ai-sdk/react": "^2.0.76",
17+
"@ai-sdk/anthropic": "^2.0.37",
18+
"@ai-sdk/react": "^2.0.77",
1919
"@apollo/client": "4.0.7",
2020
"@apollo/client-integration-nextjs": "^0.14.0",
2121
"@bprogress/next": "^3.2.12",
@@ -42,17 +42,17 @@
4242
"@tailwindcss/typography": "^0.5.19",
4343
"@tanstack/react-table": "^8.21.3",
4444
"@uiw/react-codemirror": "^4.25.2",
45-
"ai": "^5.0.76",
45+
"ai": "^5.0.77",
4646
"babel-plugin-react-compiler": "19.1.0-rc.3",
4747
"class-variance-authority": "^0.7.1",
4848
"clsx": "^2.1.1",
4949
"foxact": "^0.2.49",
5050
"graphql": "^16.11.0",
5151
"lucide-react": "^0.546.0",
52-
"next": "16.0.0",
52+
"next": "16.0.1-canary.0",
5353
"next-themes": "^0.4.6",
54-
"posthog-js": "1.278.0",
55-
"posthog-node": "^5.10.2",
54+
"posthog-js": "1.279.3",
55+
"posthog-node": "^5.10.3",
5656
"react": "19.3.0-canary-71b3a03c-20251021",
5757
"react-codemirror-merge": "^4.25.2",
5858
"react-dom": "19.3.0-canary-71b3a03c-20251021",
@@ -74,16 +74,16 @@
7474
"@graphql-codegen/schema-ast": "^5.0.0",
7575
"@graphql-typed-document-node/core": "^3.2.0",
7676
"@parcel/watcher": "^2.5.1",
77-
"@tailwindcss/postcss": "^4.1.15",
77+
"@tailwindcss/postcss": "^4.1.16",
7878
"@types/node": "^24.9.1",
7979
"@types/react": "^19.2.2",
8080
"@types/react-dom": "^19.2.2",
8181
"@typescript-eslint/parser": "^8.46.2",
8282
"dprint": "^0.50.2",
8383
"eslint": "^9.38.0",
84-
"eslint-config-next": "16.0.0",
84+
"eslint-config-next": "16.0.1-canary.0",
8585
"eslint-plugin-better-tailwindcss": "^3.7.10",
86-
"tailwindcss": "^4.1.15",
86+
"tailwindcss": "^4.1.16",
8787
"tw-animate-css": "^1.4.0",
8888
"typescript": "^5.9.3"
8989
}

0 commit comments

Comments
 (0)