Toggle navigation
Toggle navigation
This project
Loading...
Sign in
HyeonJun Jeon
/
Extended-Calendar
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
HyeonJun Jeon
2022-05-30 02:56:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6f623eabc6962f170e98999fb188c9bedc542a0c
6f623eab
1 parent
075dca1c
[Modify] Names, debug logic
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
14 deletions
src/components/Grid.js
src/pages/Debug.js
src/pages/Settings.js
src/utils/Subject.js
src/components/Grid.js
View file @
6f623ea
...
...
@@ -7,21 +7,21 @@ import GridItem from "./GridItem.js";
const
Grid
=
()
=>
{
const
{
state
}
=
useContext
(
CalendarStateContext
);
const
render
Row
s
=
()
=>
{
const
row
s
=
[];
const
render
Item
s
=
()
=>
{
const
item
s
=
[];
const
ndate
=
new
Date
(
state
.
date
);
ndate
.
setDate
(
1
);
toSunday
(
ndate
);
for
(
let
i
=
0
;
i
<
35
;
i
++
)
{
row
s
.
push
(
<
GridItem
key
=
{
i
}
targetDate
=
{
new
Date
(
ndate
)}
/>
)
;
item
s
.
push
(
<
GridItem
key
=
{
i
}
targetDate
=
{
new
Date
(
ndate
)}
/>
)
;
moveDate
(
ndate
,
"day"
,
1
);
}
return
row
s
;
return
item
s
;
};
return
<
div
className
=
"Grid"
>
{
render
Row
s
()}
<
/div>
;
return
<
div
className
=
"Grid"
>
{
render
Item
s
()}
<
/div>
;
};
export
default
Grid
;
...
...
src/pages/Debug.js
View file @
6f623ea
...
...
@@ -6,6 +6,8 @@ import "../styles/Debug.css";
import
{
initTempSubjects
}
from
"../utils/Test"
;
const
Debug
=
()
=>
{
console
.
log
(
"visit Debug"
);
const
[
state
,
setState
]
=
useState
({
type
:
"login"
,
input1
:
""
,
...
...
src/pages/Settings.js
View file @
6f623ea
...
...
@@ -3,6 +3,8 @@ import { Navigate, useNavigate } from "react-router-dom";
import
"../styles/Settings.css"
;
const
Settings
=
()
=>
{
console
.
log
(
"visit Settings"
);
const
session
=
localStorage
.
getItem
(
"session"
);
const
navigate
=
useNavigate
();
...
...
src/utils/Subject.js
deleted
100644 → 0
View file @
075dca1
class
Subject
{
constructor
(
name
,
color
,
selected
)
{
this
.
name
=
name
;
this
.
color
=
color
;
this
.
selected
=
selected
;
}
}
export
default
Subject
;
Please
register
or
login
to post a comment