Skip to content

Commit a9dce7b

Browse files
committed
fix
1 parent 5bc3fc4 commit a9dce7b

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

client/src/app/community/signup/tags/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TagCard } from "@/features/tags/components/TagCard";
22
import style from "./style.module.scss";
33

44
const RegisterTags = () => {
5-
const mockData = {
5+
const _mockData = {
66
message: "sign in successful",
77
tags: [
88
{

client/src/app/user/home/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Home() {
2323
const [searchQueryTag, setSearchQueryTag] = useState("");
2424

2525
const filteredTags = tags?.filter(tag =>
26-
tag.name.toLowerCase().includes(searchQueryTag.toLowerCase())
26+
tag.name.toLowerCase().includes(searchQueryTag.toLowerCase()),
2727
);
2828

2929
useEffect(() => {
@@ -91,7 +91,7 @@ export default function Home() {
9191
type="text"
9292
placeholder="タグ名で検索..."
9393
value={searchQueryTag}
94-
onChange={(e) => setSearchQueryTag(e.target.value)}
94+
onChange={e => setSearchQueryTag(e.target.value)}
9595
className="mb-4"
9696
/>
9797
<ScrollArea className="w-full whitespace-nowrap rounded-md gap-1">

client/src/app/user/signup/tags/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { TagCard } from "@/features/tags/components/TagCard";
22
import style from "./style.module.scss";
33

44
const RegisterTags = () => {
5-
const mockData = {
5+
const _mockData = {
66
message: "sign in successful",
77
tags: [
88
{

client/src/features/home/community/components/SearchTags.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import CardTag from "@/components/tags/card-tag";
2-
import { TagType } from "@/features/tags/types/tag";
3-
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
42
import { Input } from "@/components/ui/input";
3+
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
4+
import { TagType } from "@/features/tags/types/tag";
55
import { useState } from "react";
66
import style from "../styles/search-tags.module.scss";
77

@@ -14,7 +14,7 @@ export function SearchTags({ tags, handleTagClick }: SearchTagsProps) {
1414
const [searchQuery, setSearchQuery] = useState("");
1515

1616
const filteredTags = tags?.filter(tag =>
17-
tag.name.toLowerCase().includes(searchQuery.toLowerCase())
17+
tag.name.toLowerCase().includes(searchQuery.toLowerCase()),
1818
);
1919

2020
return (
@@ -24,7 +24,7 @@ export function SearchTags({ tags, handleTagClick }: SearchTagsProps) {
2424
type="text"
2525
placeholder="タグ名で検索..."
2626
value={searchQuery}
27-
onChange={(e) => setSearchQuery(e.target.value)}
27+
onChange={e => setSearchQuery(e.target.value)}
2828
className="mb-4"
2929
/>
3030
<ScrollArea className="w-full whitespace-nowrap rounded-md border gap-1">
@@ -39,4 +39,4 @@ export function SearchTags({ tags, handleTagClick }: SearchTagsProps) {
3939
</ScrollArea>
4040
</div>
4141
);
42-
}
42+
}

client/src/features/tags/components/TagCard.tsx

+5-10
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
1515
import { userAtom } from "@/features/account/stores";
1616
import { communityAtom } from "@/features/account/stores";
1717
import { ButtonVariant, TagType } from "@/features/tags/types/tag";
18-
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
1918
import { apiClient } from "@/utils/client";
2019
import { useAtom } from "jotai";
2120
import { useRouter } from "next/navigation";
2221
import { useEffect, useRef, useState } from "react";
2322
import { SearchBar } from "./SearchBar";
2423
import style from "./style.module.scss";
25-
import { SearchBar } from "./SearchBar";
2624

2725
type TagCardProps = {
2826
type: "user" | "community";
@@ -44,7 +42,8 @@ export const TagCard = ({ type }: TagCardProps) => {
4442
const totalSelectedTags = new Set([...selectedRegularTags, ...selectedAiTags]);
4543

4644
const filteredTags = tags.filter(tag =>
47-
tag.name.toLowerCase().includes(searchQuery.toLowerCase())
45+
tag.name.toLowerCase().includes(searchQuery.toLowerCase()),
46+
);
4847

4948
useEffect(() => {
5049
console.log("aiRecommendedTags updated:", aiRecommendedTags);
@@ -136,7 +135,7 @@ export const TagCard = ({ type }: TagCardProps) => {
136135
};
137136
}, [type, currentUser?.uuid, currentCommunity?.uuid]);
138137

139-
const handleTagClick = (index: number, isAiTag: boolean = false) => {
138+
const handleTagClick = (index: number, isAiTag = false) => {
140139
if (isAiTag) {
141140
const aiTag = aiRecommendedTags[index];
142141
const regularTagIndex = tags.findIndex(tag => tag.name === aiTag.name);
@@ -161,7 +160,6 @@ export const TagCard = ({ type }: TagCardProps) => {
161160
return newRegularSet;
162161
});
163162
}
164-
165163
}
166164
return newSet;
167165
});
@@ -213,7 +211,7 @@ export const TagCard = ({ type }: TagCardProps) => {
213211

214212
const selectedTagNames = [
215213
...Array.from(selectedRegularTags).map(index => tags[index]?.name),
216-
...Array.from(selectedAiTags).map(index => aiRecommendedTags[index]?.name)
214+
...Array.from(selectedAiTags).map(index => aiRecommendedTags[index]?.name),
217215
].filter(Boolean);
218216

219217
try {
@@ -243,10 +241,7 @@ export const TagCard = ({ type }: TagCardProps) => {
243241
</CardDescription>
244242
</CardHeader>
245243
<CardContent>
246-
<SearchBar
247-
searchQuery={searchQuery}
248-
setSearchQuery={setSearchQuery}
249-
/>
244+
<SearchBar searchQuery={searchQuery} setSearchQuery={setSearchQuery} />
250245
<ScrollArea className="w-full h-[120px] whitespace-nowrap rounded-md border">
251246
<div className={style.tagContainer}>
252247
{filteredTags.map((tag, index) => (

0 commit comments

Comments
 (0)