Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
swkim101 committed Aug 12, 2024
1 parent 8464f19 commit 4cb6a9a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as api from './api';
import conferences from './conferences';
import { conferences } from './conferences';

import { useEffect, useState } from 'react';
import Paper from './components/Paper';
Expand Down Expand Up @@ -40,7 +40,7 @@ function App() {
take: 20,
}
const [res, err] = await api.search(req)
if (!err) {
if (!err ) {
setData(res.data || [])
setTotal(res.total)
setDuration(res.duration)
Expand Down
6 changes: 3 additions & 3 deletions src/components/ConferenceTree.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import conferences from '../conferences';
import { conferences, comments } from '../conferences';
import { isEven } from '../functional';

/**
Expand Down Expand Up @@ -44,7 +44,7 @@ function ConferenceTree(props) {

return (
<div>
{conferences.tree.name} [ <span onClick={() => setVenue([])} className='underline pointer'>off</span> | <span onClick={() => setVenue(conferences.flatten(conferences.tree))} className='underline pointer'>on</span> ]
{conferences.tree.name} (2018-2024) [ <span onClick={() => setVenue([])} className='underline pointer'>off</span> | <span onClick={() => setVenue(conferences.flatten(conferences.tree))} className='underline pointer'>on</span> ]
{
conferences.tree.children.map(d1 =>
<div key={d1.name}>
Expand All @@ -68,7 +68,7 @@ function ConferenceTree(props) {
</div>
{isUnfolded(d2.name) && d2.children.map((d3, idx) =>
<div key={d3.name} className={`flex justify-between ${isEven(idx) && "bg-gray-100"}`}>
<label htmlFor={d3.name}>{d3.name}</label>
<label htmlFor={d3.name}>{d3.name}{comments[d3.name]}</label>
<input checked={venue.includes(d3.name)} onChange={e => addOrDelVenue(d3.name, e.target.checked)} type="checkbox" id={d3.name} />
</div>
)}
Expand Down
11 changes: 10 additions & 1 deletion src/conferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const edges = [
["Software engineering", "ISSTA"],

["Systems", "Programming languages"],
["Programming languages", "PACMPL"],
["Programming languages", "PLDI"],

["All Areas", "Theory"],
Expand Down Expand Up @@ -91,6 +92,11 @@ const edges = [
["Robotics", "RSS"],
]

const comments = {
"PLDI": "(2018 - 2022)",
"SOSP": "(2017 - 2023), biyearly",
}

/**
* Return leaves's names.
* @typedef {{ name: string, children: [Tree] }} Tree
Expand All @@ -107,4 +113,7 @@ const conferences = {
flatten,
}

export default conferences
export {
conferences,
comments
}

0 comments on commit 4cb6a9a

Please sign in to comment.