-
Notifications
You must be signed in to change notification settings - Fork 2
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 #203 from boostcampwm2023/develop
[Deploy] Week4 ver2 배포
- Loading branch information
Showing
120 changed files
with
2,705 additions
and
770 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,53 +1,23 @@ | ||
import { useFetch } from 'shared/hooks'; | ||
import Post from './Post'; | ||
import * as THREE from 'three'; | ||
import { useState } from 'react'; | ||
import { StarData } from 'shared/lib/types/star'; | ||
|
||
export default function Posts() { | ||
const [post, setPost] = useState(0); | ||
const { data } = useFetch<StarData[]>('star'); | ||
|
||
return ( | ||
<> | ||
{dummyData.map((data, index) => ( | ||
<Post | ||
key={index} | ||
data={data} | ||
onClick={() => setPost(index)} | ||
isSelected={post === index} | ||
/> | ||
))} | ||
{data && | ||
data.map((data, index) => ( | ||
<Post | ||
key={index} | ||
data={data} | ||
onClick={() => setPost(index)} | ||
isSelected={post === index} | ||
/> | ||
))} | ||
</> | ||
); | ||
} | ||
|
||
const dummyData = [ | ||
{ | ||
position: new THREE.Vector3(1000, 1000, 1800), | ||
size: 100, | ||
color: 'red', | ||
title: '별글입니당', | ||
content: '# 배가고프다', | ||
images: [ | ||
'https://github.com/boostcampwm2023/web16-B1G1/assets/35567292/ed205126-f8c5-4f84-98d9-fade19cd6c1d', | ||
], | ||
}, | ||
{ | ||
position: new THREE.Vector3(1300, 500, 1000), | ||
size: 200, | ||
color: 'blue', | ||
title: '별글입니당', | ||
content: '~stroke~', | ||
images: [ | ||
'https://github.com/boostcampwm2023/web16-B1G1/assets/35567292/ed205126-f8c5-4f84-98d9-fade19cd6c1d', | ||
], | ||
}, | ||
{ | ||
position: new THREE.Vector3(3000, 1000, 2500), | ||
size: 150, | ||
color: 'yellow', | ||
title: '별글입니당', | ||
content: "- I'm hungry", | ||
images: [ | ||
'https://github.com/boostcampwm2023/web16-B1G1/assets/35567292/ed205126-f8c5-4f84-98d9-fade19cd6c1d', | ||
], | ||
}, | ||
]; // TODO: 서버로부터 받아온 데이터로 변경 필요 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import instance from 'shared/apis/AxiosInterceptor'; | ||
import { BASE_URL } from '@constants'; | ||
|
||
export const deletePost = async (postId: string) => { | ||
const { data } = await instance({ | ||
method: 'DELETE', | ||
url: `${BASE_URL}/post/${postId}`, | ||
}); | ||
|
||
return data; | ||
}; |
Oops, something went wrong.