Skip to content

Commit 4ec93ac

Browse files
author
pip-pipo
committed
Ⓜ️
1 parent 7ed7f9b commit 4ec93ac

File tree

4 files changed

+14
-31
lines changed

4 files changed

+14
-31
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<h1 align="center">React_social_media_platform</h1>
1+
<h1 align="center">
2+
3+
[React_social_media_platform](https://laughing-swanson-750b20.netlify.app/)
4+
</h1>
25

36
<div align="center" id="top">
47
<img src="./src/components/Img/img.png" alt="React_codeing_social_platform" />
@@ -7,6 +10,7 @@
710
<!-- <a href="https://react_codeing_social_platform.netlify.app">Demo</a> -->
811
</div>
912

13+
## [current Version ](https://laughing-swanson-750b20.netlify.app/)
1014

1115
<p align="center">
1216
<img alt="Github top language" src="https://img.shields.io/github/languages/top/pip-pipo/React_little_project?color=56BEB8">

src/components/pages/Blog.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ const Blog = () => {
2828
loading ? <h2>Loading....</h2> : <div>
2929
{
3030
value.map((getData) => (
31-
<div className="blogsData" style={{whiteSpace:"pre-line"}} >
31+
<div className="blogsData" style={{whiteSpace:"pre-line",wordBreak:"break-word",fontFamily:"monospace"}} >
3232
<h3><span>Title: </span>{getData.title}</h3>
3333
<h5><span>Author: </span>{getData.author}</h5>
3434
<h3 ><span>Blog: </span>{getData.blog}</h3>
3535
<h5 style={{marginTop:'20px'}}><span>Tags: </span>{getData.tags}</h5>
3636
<button style={{outline:"none"}} onClick={() => deleteHandle(getData.id)}>Delete</button>
3737
<button style={{outline:"none"}}><Link to={`/editBlog/${getData.id}`} style={{textDecoration:"none" ,color:"white"}}>Edit</Link></button>
38+
3839
</div>
3940
))
4041
}

src/components/pages/EditBlog.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const EditBlog = () => {
5656
<div className="writePost">
5757
<div className="writePost__wrapper">
5858
<div className="writePost__first">
59-
<h3>Write a Post</h3>
59+
<h3>Edit Post</h3>
6060
</div>
6161
<div className="writePost__middle">
6262
<h4 className="text-danger">{err ? err : ''}</h4>
@@ -69,9 +69,12 @@ const EditBlog = () => {
6969
<input onChange={inputHandle} value={tags} type="text" className="form-control my-3" name="tags" placeholder=" Related Tags" />
7070
<input onChange={inputHandle} value={author} type="text" className="form-control my-3" name="author" placeholder=" Author Name" />
7171
<textarea rows={5} cols={5} style={{ whiteSpace: "pre-line" }} id="text-area" aria-label="Post Content" spellCheck="false" onChange={inputHandle} value={blog} type="text-area" className="form-control my-3" name="blog" placeholder=" Your Blog" />
72-
72+
7373
<button onClick={submitHandle}> <Link style={{ textDecoration: "none" }} to="/blog">Publish</Link> </button>
74-
<button style={{ textDecoration: "none" }} ><Link to="/welcome">Back To Profile</Link> </button>
74+
<button ><Link style={{ textDecoration: "none" }} to="/welcome">Back To Profile</Link> </button>
75+
76+
77+
7578
</form>
7679
</div>
7780
</div>

src/components/pages/WritePost.js

+1-26
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,6 @@ const WritePost = () => {
3232
}
3333
}
3434

35-
// console.log(blog);
36-
// const replaceData = blog;
37-
// replaceData.replace(/\n/g, '<br>\n')
38-
// console.log(replaceData);
39-
40-
// function onTestChange() {
41-
42-
// var key = window.event.keyCode;
43-
44-
// // If the user has pressed enter
45-
// if (key === 13) {
46-
// const valuedata = document.getElementById("text-area").value;
47-
// valuedata.replace(/\n/g, '<br>\n')
48-
// }
49-
// else {
50-
// return true;
51-
// }
52-
// }
53-
54-
55-
// if(blog){
56-
// const textArea = document.querySelector('#text-area');
57-
// textArea.addEventListener('keypress',onTestChange)
58-
// }
59-
6035

6136
return (
6237
<div className="writePost">
@@ -77,7 +52,7 @@ const WritePost = () => {
7752
<textarea rows={5} cols={5} style={{whiteSpace:"pre-line"}} id="text-area" aria-label="Post Content" spellCheck="false" onChange={inputHandle} value={blog} type="text-area" className="form-control my-3" name="blog" placeholder=" Your Blog" />
7853

7954
<button onClick={submitHandle}> <Link style={{ textDecoration: "none" }} to="/blog">Publish</Link> </button>
80-
<button style={{ textDecoration: "none" }} ><Link to="/welcome">Back To Profile</Link> </button>
55+
<button ><Link style={{ textDecoration:"none" }} to="/welcome">Back To Profile</Link> </button>
8156
</form>
8257
</div>
8358
</div>

0 commit comments

Comments
 (0)