육현진

Create Student

1 -[{"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\index.js":"1","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\reportWebVitals.js":"2","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\App.js":"3"},{"size":500,"mtime":499162500000,"results":"4","hashOfConfig":"5"},{"size":362,"mtime":499162500000,"results":"6","hashOfConfig":"5"},{"size":241,"mtime":1607351603724,"results":"7","hashOfConfig":"5"},{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"10"},"16rehmo",{"filePath":"11","messages":"12","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"10"},{"filePath":"13","messages":"14","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\index.js",[],["15","16"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\reportWebVitals.js",[],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\App.js",["17"],{"ruleId":"18","replacedBy":"19"},{"ruleId":"20","replacedBy":"21"},{"ruleId":"22","severity":1,"message":"23","line":7,"column":7,"nodeType":"24","endLine":7,"endColumn":36},"no-native-reassign",["25"],"no-negated-in-lhs",["26"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","no-global-assign","no-unsafe-negation"]
...\ No newline at end of file ...\ No newline at end of file
1 +[{"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\index.js":"1","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\reportWebVitals.js":"2","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\App.js":"3","C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\components\\Student.js":"4"},{"size":500,"mtime":499162500000,"results":"5","hashOfConfig":"6"},{"size":362,"mtime":499162500000,"results":"7","hashOfConfig":"6"},{"size":1279,"mtime":1607355610693,"results":"8","hashOfConfig":"6"},{"size":1669,"mtime":1607355555245,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"16rehmo",{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},{"filePath":"15","messages":"16","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"12"},"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\index.js",[],["19","20"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\reportWebVitals.js",[],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\App.js",["21"],"C:\\Users\\sally\\Desktop\\3-1\\DBproject\\project\\src\\components\\Student.js",[],{"ruleId":"22","replacedBy":"23"},{"ruleId":"24","replacedBy":"25"},{"ruleId":"26","severity":1,"message":"27","line":1,"column":27,"nodeType":"28","messageId":"29","endLine":1,"endColumn":37},"no-native-reassign",["30"],"no-negated-in-lhs",["31"],"no-unused-vars","'components' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation"]
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -10,34 +10,14 @@ ...@@ -10,34 +10,14 @@
10 content="Web site created using create-react-app" 10 content="Web site created using create-react-app"
11 /> 11 />
12 <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> 12 <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13 - <!-- 13 +
14 - manifest.json provides metadata used when your web app is installed on a
15 - user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16 - -->
17 <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> 14 <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18 - <!--
19 - Notice the use of %PUBLIC_URL% in the tags above.
20 - It will be replaced with the URL of the `public` folder during the build.
21 - Only files inside the `public` folder can be referenced from the HTML.
22 15
23 - Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24 - work correctly both with client-side routing and a non-root public URL.
25 - Learn how to configure a non-root public URL by running `npm run build`.
26 - -->
27 <title>React App</title> 16 <title>React App</title>
28 </head> 17 </head>
29 <body> 18 <body>
30 <noscript>You need to enable JavaScript to run this app.</noscript> 19 <noscript>You need to enable JavaScript to run this app.</noscript>
31 <div id="root"></div> 20 <div id="root"></div>
32 - <!--
33 - This HTML file is a template.
34 - If you open it directly in the browser, you will see an empty page.
35 -
36 - You can add webfonts, meta tags, or analytics to this file.
37 - The build step will place the bundled scripts into the <body> tag.
38 21
39 - To begin the development, run `npm start` or `yarn start`.
40 - To create a production bundle, use `npm run build` or `yarn build`.
41 - -->
42 </body> 22 </body>
43 </html> 23 </html>
......
1 -import logo from './logo.svg'; 1 +import React, {Component, components} from 'react';
2 import './App.css'; 2 import './App.css';
3 +import Student from './components/Student';
4 +
5 +const students = [
6 + {
7 + 'st_Code': 6666,
8 + 'st_Name': '육현진',
9 + 'st_Id': 2018102210,
10 + 'st_Major':'컴퓨터공학과',
11 + 'st_Midscore': 100,
12 + 'st_Finalscore': 100,
13 + 'st_Assignscore': 100,
14 + 'st_Attendscore': 100,
15 + 'st_Score':'A+'
16 +},
17 +{
18 + 'st_Code': 1111,
19 + 'st_Name': '김창동',
20 + 'st_Id': 2020021120,
21 + 'st_Major':'컴퓨터공학과',
22 + 'st_Midscore': 79,
23 + 'st_Finalscore': 85,
24 + 'st_Assignscore': 100,
25 + 'st_Attendscore': 90,
26 + 'st_Score':'A0'
27 +}]
28 +
29 +class App extends Component{
30 + render(){
31 + return (
32 + <div>
33 + {
34 + students.map(c=>{
35 + return (
36 + <Student
37 + key={c.st_Code}
38 + st_Code={c.st_Code}
39 + st_Name={c.st_Name}
40 + st_Id={c.st_Id}
41 + st_Major={c.st_Major}
42 + st_Midscore={c.st_Midscore}
43 + st_Finalscore={c.st_Finalscore}
44 + st_Assignscore={c.st_Assignscore}
45 + st_Attendscore={c.st_Attendscore}
46 + st_Score={c.st_Score}
47 + />
48 + );
49 + })
50 + }
51 + </div>
3 52
4 -function App() {
5 - return (
6 - <div className="gray-background">
7 - <img src={logo} lat="logo" />
8 - <h2>Let's develop management system!</h2>
9 - </div>
10 ); 53 );
54 + }
11 } 55 }
12 56
13 export default App; 57 export default App;
......
1 +import React from 'react';
2 +
3 +class Student extends React.Component{
4 + render(){
5 + return(
6 + <div>
7 +
8 + <Searchscores st_Midscore={this.props.st_Midscore}
9 + st_Finalscore = {this.props.st_Finalscore}
10 + st_Assignscore = {this.props.st_Assignscore}
11 + st_Attendscore = {this.props.st_Attendscore}/>
12 +
13 + <Searchscore st_Score={this.props.st_Score}/>
14 +
15 + <Searchothers st_Midscore={this.props.st_Midscore}
16 + st_Finalscore = {this.props.st_Finalscore}
17 + st_Assignscore = {this.props.st_Assignscore}
18 + st_Attendscore = {this.props.st_Attendscore}
19 + st_Score = {this.props.st_Score}/>
20 +
21 + </div>
22 + )
23 + }
24 +}
25 +
26 +class Searchscores extends React.Component{
27 + render(){
28 + return(
29 + <div>
30 +
31 + <p>{this.props.st_Midscore}</p>
32 + <p>{this.props.st_Finalscore}</p>
33 + <p>{this.props.st_Assignscore}</p>
34 + <p>{this.props.st_Attendscore}</p>
35 +
36 + </div>
37 + )
38 + }
39 +}
40 +
41 +
42 +class Searchscore extends React.Component{
43 + render(){
44 + return(
45 + <div>
46 + <p>{this.props.st_Score}</p>
47 + </div>
48 + )
49 + }
50 +}
51 +
52 +class Searchothers extends React.Component{
53 + render(){
54 + return(
55 + <div>
56 + <p>{this.props.st_Midscore}</p>
57 + <p>{this.props.st_Finalscore}</p>
58 + <p>{this.props.st_Assignscore}</p>
59 + <p>{this.props.st_Attendscore}</p>
60 + <p>{this.props.st_Score}</p>
61 + </div>
62 + )
63 + }
64 +}
65 +
66 +export default Student;
...\ No newline at end of file ...\ No newline at end of file