generated from jphacks/JP_sample
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from ShibeaRlz/feature/1069
Feature/1069 chatroom復元
- Loading branch information
Showing
120 changed files
with
2,869 additions
and
816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
docker/swagger/bundle: | ||
docker run -v $(PWD):/spec --rm redocly/cli:latest bundle docs/swagger/root.swagger.yml --output=docs/swagger/generated.gen.swagger.yml | ||
|
||
docker/swagger/validate: | ||
docker run -v ${PWD}:/tmp --rm openapitools/openapi-generator-cli validate -i /tmp/docs/swagger/generated.gen.swagger.yml | ||
|
||
run-local: | ||
cd server && make run-local /& | ||
cd client && yarn dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "../../../styles/theme"; | ||
@use "@/styles/theme"; | ||
|
||
.background { | ||
background-color: theme.$black; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,7 @@ | ||
"use client"; | ||
import { CommunityHome } from "@/features/home/community"; | ||
|
||
import { Badge } from "@/components/ui/badge"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Input } from "@/components/ui/input"; | ||
import { ScrollArea } from "@/components/ui/scroll-area"; | ||
import { User } from "@/features/account/types/user"; | ||
import { UserCard } from "@/features/community-home/components/user-card"; | ||
import { GetUsers } from "@/features/community-home/hooks/gets-users"; | ||
import { Search } from "lucide-react"; | ||
import { useEffect, useState } from "react"; | ||
import styles from "./style.module.scss"; | ||
const CommunityHomePage = () => { | ||
return <CommunityHome />; | ||
}; | ||
|
||
export default function Home() { | ||
const [users, setUsers] = useState<User[]>([]); | ||
const [searchQuery, setSearchQuery] = useState(""); | ||
const [selectedUser, setSelectedUser] = useState<User[]>([]); | ||
const [textAreaValue, setTextAreaValue] = useState(""); | ||
|
||
useEffect(() => { | ||
GetUsers().then(users => { | ||
setUsers(users); | ||
}); | ||
}, []); | ||
|
||
const filteredUsers = users.filter(user => | ||
user.name.toLowerCase().includes(searchQuery.toLowerCase()), | ||
); | ||
|
||
const handleCardClick = (user: User) => { | ||
if (!selectedUser.includes(user)) { | ||
setSelectedUser([...selectedUser, user]); | ||
} else { | ||
setSelectedUser(selectedUser.filter(selected => selected !== user)); | ||
} | ||
}; | ||
|
||
const handleSubmit = () => { | ||
//selectedUserのuuidをconsole.logで出力 | ||
selectedUser.map(user => console.log(user.uuid)); | ||
console.log(textAreaValue); | ||
setTextAreaValue(""); | ||
}; | ||
|
||
return ( | ||
<> | ||
<h1 className="text-2xl font-bold text-white mt-4 ml-10">ホーム</h1> | ||
<div className="container mx-auto p-4"> | ||
<div className="flex justify-center mb-6"> | ||
<div className="w-full max-w-md relative"> | ||
<Input | ||
type="text" | ||
placeholder="ユーザー名で検索..." | ||
value={searchQuery} | ||
onChange={e => setSearchQuery(e.target.value)} | ||
className="w-full pr-10" | ||
/> | ||
<div className="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-500"> | ||
<Search size={20} /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<ScrollArea className="h-96 w-full rounded-md border"> | ||
<div className="grid grid-cols-2 gap-2 p-4"> | ||
{filteredUsers.map(user => { | ||
return ( | ||
<UserCard | ||
key={user.name} | ||
uuid={user.uuid} | ||
username={user.name} | ||
icon={user.img} | ||
tags={user.tags} | ||
detail={user.self} | ||
university={user.mem1} | ||
onClick={() => { | ||
handleCardClick(user); | ||
}} | ||
/> | ||
); | ||
})} | ||
</div> | ||
</ScrollArea> | ||
<div className="mt-4"> | ||
<div className="w-full h-full pointer-events-none"> | ||
<div className="p-2"> | ||
{selectedUser.map(user => ( | ||
<span key={user.uuid} className={`${styles.userName} ${styles.fadeIn}`}> | ||
<Badge className="bg-white text-black border-blue-500">{user.name}</Badge> | ||
</span> | ||
))} | ||
</div> | ||
</div> | ||
<textarea | ||
className="w-full h-60 p-2 border rounded-md" | ||
value={textAreaValue} | ||
onChange={e => setTextAreaValue(e.target.value)} | ||
placeholder="スカウトメッセージを入力してください..." | ||
/> | ||
<div className="flex justify-end mt-2"> | ||
<Button onClick={handleSubmit}>招待を送る</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
export default CommunityHomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "../../../styles/theme"; | ||
@use "@/styles/theme"; | ||
|
||
.background { | ||
background-color: theme.$black; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@use "../../../styles/theme"; | ||
@use "@/styles/theme"; | ||
|
||
.body { | ||
background-color: theme.$gray; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { TagCard } from "@/features/tags/components/TagCard"; | ||
import style from "./style.module.scss"; | ||
|
||
const RegisterTags = () => { | ||
const mockData = { | ||
message: "sign in successful", | ||
tags: [ | ||
{ | ||
ID: 2, | ||
color: "red", | ||
Name: "st", | ||
}, | ||
{ | ||
ID: 3, | ||
color: "blue", | ||
Name: "a", | ||
}, | ||
{ | ||
ID: 5, | ||
color: "green", | ||
Name: "r", | ||
}, | ||
{ | ||
ID: 1, | ||
color: "gray", | ||
Name: "hogehoge", | ||
}, | ||
{ | ||
ID: 4, | ||
color: "purple", | ||
Name: "d", | ||
}, | ||
], | ||
}; | ||
|
||
return ( | ||
<div className={style.card}> | ||
<TagCard type={"community"} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RegisterTags; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.