Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vt-research-connect-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cscapstone-group3
vt-research-connect-frontend
Commits
9331634a
Commit
9331634a
authored
7 months ago
by
hannahl8
Browse files
Options
Downloads
Patches
Plain Diff
update created at
parent
de3032f6
No related branches found
No related tags found
No related merge requests found
Pipeline
#10841
failed
7 months ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/OpeningListItem.tsx
+0
-7
0 additions, 7 deletions
src/components/OpeningListItem.tsx
src/components/OpeningPopup.tsx
+4
-3
4 additions, 3 deletions
src/components/OpeningPopup.tsx
src/types.ts
+0
-4
0 additions, 4 deletions
src/types.ts
with
4 additions
and
14 deletions
src/components/OpeningListItem.tsx
+
0
−
7
View file @
9331634a
...
...
@@ -15,9 +15,6 @@ export default function OpeningListItem(props: { opening: OpeningsItem }) {
const
createdAtString
=
createdAtDate
.
toLocaleString
(
'
en-US
'
,
dateTimeFormatOptions
);
const
professorName
=
`
${
props
.
opening
.
professor
.
firstName
}
${
props
.
opening
.
professor
.
lastName
}
`
const
createdAt
=
props
.
opening
.
createdAt
;
const
[
showPopup
,
setShowPopup
]
=
useState
(
false
);
const
togglePopup
=
()
=>
{
setShowPopup
(
!
showPopup
);
...
...
@@ -28,14 +25,10 @@ export default function OpeningListItem(props: { opening: OpeningsItem }) {
<
li
key
=
{
id
}
className
=
"opening-item"
>
<
h1
className
=
"opening-title"
onClick
=
{
togglePopup
}
>
{
name
}
</
h1
>
<
p
className
=
"opening-lab"
>
{
labName
}
</
p
>
<
p
className
=
"opening-details"
><
Link
to
=
{
`
${
profilePagePath
}
/PROFESSOR/
${
professorName
}
`
}
>
{
professorName
}
</
Link
>
posted a
<
strong
>
{
type
}
</
strong
>
opportunity on
{
createdAtString
}
</
p
>
<
p
className
=
"opening-type"
>
{
type
}
</
p
>
<
p
className
=
"opening-created-at"
>
{
new
Date
(
createdAt
).
toLocaleString
()
}
</
p
>
</
li
>
{
showPopup
&&
(
<
OpeningPopup
opening
=
{
props
.
opening
}
onClose
=
{
togglePopup
}
/>
...
...
This diff is collapsed.
Click to expand it.
src/components/OpeningPopup.tsx
+
4
−
3
View file @
9331634a
...
...
@@ -2,6 +2,7 @@ import {OpeningsItem} from "../types.ts";
import
React
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
"
./Popup.css
"
import
{
dateTimeFormatOptions
}
from
"
../utils.ts
"
;
// import {dateTimeFormatOptions} from "../utils.ts";
interface
OpeningPopupProps
{
...
...
@@ -13,8 +14,8 @@ const OpeningPopup: React.FC<OpeningPopupProps> = ({opening, onClose}) => {
if
(
!
opening
)
return
null
;
console
.
log
(
opening
)
//
const createdAtDate = new Date(opening.createdAt);
//
const createdAtString = createdAtDate.toLocaleString('en-US', dateTimeFormatOptions);
const
createdAtDate
=
new
Date
(
opening
.
createdAt
);
const
createdAtString
=
createdAtDate
.
toLocaleString
(
'
en-US
'
,
dateTimeFormatOptions
);
const
professorName
=
`
${
opening
.
professor
.
firstName
}
${
opening
.
professor
.
lastName
}
`
return
(
...
...
@@ -41,7 +42,7 @@ const OpeningPopup: React.FC<OpeningPopupProps> = ({opening, onClose}) => {
</
div
>
<
div
>
<
h3
>
Created At
</
h3
>
<
p
>
{
new
Date
(
opening
.
createdAt
).
toLocale
String
()
}
</
p
>
<
p
>
{
createdAt
String
}
</
p
>
</
div
>
<
section
>
<
Link
to
=
{
`
${
opening
.
url
}
`
}
target
=
"_blank"
>
...
...
This diff is collapsed.
Click to expand it.
src/types.ts
+
0
−
4
View file @
9331634a
...
...
@@ -38,11 +38,7 @@ export interface OpeningsItem {
url
:
string
;
labName
:
string
;
professor
:
ProfessorUser
;
<<<<<<<
Updated
upstream
createdAt
:
Date
;
=======
createdAt
:
string
;
>>>>>>>
Stashed
changes
}
export
interface
CollegeItem
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment