From 18c5b6cd8ff9bf03c6142f22fa38c45dfffcb650 Mon Sep 17 00:00:00 2001 From: Ellie-kang Date: Thu, 3 Nov 2022 15:59:13 +0900 Subject: [PATCH 1/3] =?UTF-8?q?11=EC=9B=943=EC=9D=BC=EC=98=A4=ED=9B=843?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/.env | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 client/.env diff --git a/client/.env b/client/.env new file mode 100644 index 0000000..2d1dbcb --- /dev/null +++ b/client/.env @@ -0,0 +1,5 @@ +MONGODB='mongodb+srv://takoyaki-cluster.aovdheg.mongodb.net/Takoyaki-DB?authSource=%24external&authMechanism=MONGODB-X509&retryWrites=true&w=majority' +SECRET=aae08e313ca6ee1dcdbe191db59c4af17b242b21c2b23e4bcba8239ae4de9206 +WEB3KEY=5c093988cddb4e77a7d78369e7b2e384 +CONTRACT=0x04a49E94d26B1D51E0bDe72B193882eCa7EB4722 +PRIVATEKEY=61e4dbfbf9fc8ac2dec5b43d1d04dbc0e33ca17d296d2c144b3096e5d142fbe1 \ No newline at end of file From 6a7f860dff2d69d0e1f6d410bebb3b86bd9abf28 Mon Sep 17 00:00:00 2001 From: Ellie-kang Date: Fri, 4 Nov 2022 13:41:34 +0900 Subject: [PATCH 2/3] [client] --- client/src/App.js | 5 +++-- client/src/components/Article.js | 5 +++-- client/src/components/Comments.js | 17 ++++++++++++++--- client/src/components/Like.js | 2 ++ client/src/index.css | 2 +- client/src/utils/Article.css | 9 +++++---- client/src/utils/MainPage.css | 6 +++--- 7 files changed, 31 insertions(+), 15 deletions(-) diff --git a/client/src/App.js b/client/src/App.js index 0e2ade1..373c983 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -37,8 +37,9 @@ const App = () => { palette: { background: { paper: '#ffffff', - footer: '#a9def9', - header: '#a9def9', + footer: 'rgba(32,78,128)', + // header: 'rgb(106,145,192)', + header: '#54d8dc', lock: 'rgba(47, 83, 239)', yellow: "#F0B918" }, diff --git a/client/src/components/Article.js b/client/src/components/Article.js index 1973ece..b671e17 100644 --- a/client/src/components/Article.js +++ b/client/src/components/Article.js @@ -10,7 +10,7 @@ import Avatar from '@mui/material/Avatar'; import Typography from '@mui/material/Typography'; import '../utils/Article.css'; import '../utils/Font.css'; -import { Box } from '@mui/material'; +import { Box, Link } from '@mui/material'; const Article = (props) => { const context = useContext(AppContext); @@ -23,7 +23,8 @@ const Article = (props) => { sx={{ borderRadius: '10px' }} > } diff --git a/client/src/components/Comments.js b/client/src/components/Comments.js index 6da0fae..60c2658 100644 --- a/client/src/components/Comments.js +++ b/client/src/components/Comments.js @@ -1,11 +1,13 @@ -import React, { useState, useContext } from 'react' +import React, { useState, useContext,useEffect } from 'react' import { AppContext } from "../AppContext"; import { ThemeProvider } from '@mui/material/styles'; -import { Stack,Button, fabClasses } from '@mui/material'; +import { Stack,Button, fabClasses, Chip } from '@mui/material'; import Typography from '@mui/material/Typography'; import Avatar from '@mui/material/Avatar'; import "../utils/Comments.css" import { Box } from '@mui/system'; +import HighlightOffIcon from '@mui/icons-material/HighlightOff'; +import axios from 'axios'; export const Comments = () => { const context = useContext(AppContext); @@ -30,6 +32,11 @@ export const Comments = () => { } } + const deleteComment = (targetId) => { + const deleteList = commentLists.filter((comment) => comment.id !== targetId); + setCommentLists(deleteList); + } + return ( @@ -62,7 +69,11 @@ export const Comments = () => { {userId} - {comment.content} + {comment.content} + + ) })} diff --git a/client/src/components/Like.js b/client/src/components/Like.js index bb222c9..04a10b1 100644 --- a/client/src/components/Like.js +++ b/client/src/components/Like.js @@ -9,6 +9,8 @@ export const Like = () => { const [isLike, setIsLike] = useState(false); const [count, setCount] = useState(1); + axios.patch('http://localhost:3001/articles/liek',) + return (
{isLike diff --git a/client/src/index.css b/client/src/index.css index 66af31b..8103ea5 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -2,7 +2,7 @@ body { margin-left: 0; margin-right: 0; margin-bottom: 0; - background-color: rgb(252, 250, 234); + background-color: rgb(252,250,250); font-family: 'Poppins'; } diff --git a/client/src/utils/Article.css b/client/src/utils/Article.css index e6b9545..ca0e8eb 100644 --- a/client/src/utils/Article.css +++ b/client/src/utils/Article.css @@ -1,21 +1,22 @@ .contents-container { max-width: 600px; - background-color: rgba(47, 83, 239); + background-color:white; margin-bottom: 30px; border-radius: 10px; } .css-1qbkelo-MuiCardHeader-content > span { - color: #ffffff; - font-weight: 600; + color: black; + font-weight: 550; font-size: 19px; } .contents-container > footer { - background-color: #a9def9; + background-color: rgb(239,204,202); padding-bottom: 20px; color: white; font-size: 15px; font-weight: 600; } + diff --git a/client/src/utils/MainPage.css b/client/src/utils/MainPage.css index 241b7ed..4c6efcc 100644 --- a/client/src/utils/MainPage.css +++ b/client/src/utils/MainPage.css @@ -8,7 +8,7 @@ } .nav-list { - background-color: white; + background-color:white; border: none; border-top-left-radius: 5px; border-top-right-radius: 5px; @@ -46,11 +46,11 @@ } #flight { - color: #a9def9; + color: rgba(231,127,112); } #flag { - color: #a9def9; + color: rgba(113,122,133); } From e8c8aeb0b270905da841cdec2c596efc64789dab Mon Sep 17 00:00:00 2001 From: Ellie-kang Date: Fri, 4 Nov 2022 13:43:40 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[client]11=EC=9B=944=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Like.js | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/components/Like.js b/client/src/components/Like.js index 04a10b1..1101a70 100644 --- a/client/src/components/Like.js +++ b/client/src/components/Like.js @@ -9,7 +9,6 @@ export const Like = () => { const [isLike, setIsLike] = useState(false); const [count, setCount] = useState(1); - axios.patch('http://localhost:3001/articles/liek',) return (