From 04c5ec74f3b827a4614ea3cb3d9c4a3c38d29b06 Mon Sep 17 00:00:00 2001 From: Schuyler deVos Date: Fri, 26 Jun 2020 02:36:45 -0400 Subject: [PATCH 01/14] initial commit, api route testing and group org component --- .python-version | 1 + components/global/ArticleCard.tsx | 11 ++- components/global/ArticleList.tsx | 10 ++- components/profile/GroupSetting.tsx | 71 +++++++++++++++ lib/api/tag.ts | 24 +++++ pages/dashboard/[pid].tsx | 134 +++++++++++++++++++++++----- 6 files changed, 222 insertions(+), 29 deletions(-) create mode 100644 .python-version create mode 100644 components/profile/GroupSetting.tsx diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..75422e2 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.7.2-amd64 diff --git a/components/global/ArticleCard.tsx b/components/global/ArticleCard.tsx index eba1b20..bb104ce 100644 --- a/components/global/ArticleCard.tsx +++ b/components/global/ArticleCard.tsx @@ -68,7 +68,8 @@ const StyledEmoji = styled.span` ` /* article state: draft, review, pubished, complete*/ -const ArticleCard = ({ article, showAuth = false, onLeftButtonClick = null, onRightButtonClick = null }) => { +const ArticleCard = ({ article, currentTag = null, modReview=false, showAuth = false, onLeftButtonClick = null, onRightButtonClick = null }) => { + const tags = article.tagList.map((tag, i) => ( diff --git a/components/global/ArticleList.tsx b/components/global/ArticleList.tsx index 6da6ce2..bdae4bc 100644 --- a/components/global/ArticleList.tsx +++ b/components/global/ArticleList.tsx @@ -1,6 +1,7 @@ import React from 'react' import ArticleCard from './ArticleCard' import {List} from 'antd' +import TagAPI from "../../lib/api/tag"; const ArticleList = props =>( ( dataSource={props.articles} renderItem={article => ( - TagAPI.rejectTag(article,props.currentTag)} + onRightButtonClick = {props.onRightButtonClick} + /> : + />} )} /> diff --git a/components/profile/GroupSetting.tsx b/components/profile/GroupSetting.tsx new file mode 100644 index 0000000..3dfb480 --- /dev/null +++ b/components/profile/GroupSetting.tsx @@ -0,0 +1,71 @@ +import React from 'react'; +import styled from 'styled-components' +import { Row, Col, Card, Avatar, Button, Space, Layout, Typography, Form, Input } from 'antd'; +import { UserOutlined } from '@ant-design/icons'; + +const { Header, Footer, Sider, Content } = Layout; +const { Title, Paragraph, Text } = Typography; +const { TextArea } = Input; + +const { Search } = Input; + +const GroupSetting = props => { + + return( + + + + + + Org Profile Pic + + + + + + + + + Tag Slug + + + console.log(value)} + /> + + + + + Org Description +
+ +