-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React & Node.js #16
React & Node.js #16
Conversation
frontend/public/index.html
Outdated
<meta name="theme-color" content="#000000" /> | ||
<meta name="description" content="Web site created using create-react-app" /> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/images/logo192.png" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now. We might want to deal with analytics in the next major push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of code cleanup and standardizing of methods mainly. Besides that, looks really good.
background: var(--blue); | ||
border-radius: 15px; | ||
height: 18px; | ||
margin-top: -6px; | ||
transition: width .6s ease; | ||
transition: wiedth .6s ease; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
frontend/public/manifest.json
Outdated
@@ -0,0 +1,25 @@ | |||
{ | |||
"short_name": "Abacus", | |||
"name": "Create React App Sample", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this?
frontend/.eslintrc.json
Outdated
// "env": { | ||
// "browser": true, | ||
// "es2021": true | ||
// }, | ||
// "plugins": ["react", "@typescript-eslint"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this?
backend/server.ts
Outdated
|
||
app.use(cors()) | ||
app.use(bodyParser.json()) | ||
// app.use(bodyParser.urlencoded({ extended: true })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this? Specifically line 24.
README.md
Outdated
- Backend and frontend run as two seperate processes. You have two choices here | ||
- From the repo root directory, open one terminal and run `npm run dev` | ||
- Open two terminals (or command prompt). In one terminal run `npm start` from the `frontend` directory and in the other terminal, run `npm run dev` from the `backend` directory. | ||
- After running the frontend (eitehr way) the terminal should open a new web browser window to `localhost:3000` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type. Should be "either"
frontend/src/pages/blue/index.tsx
Outdated
{/* {!hasAccess('blue') ? | ||
<> | ||
<DefaultNavigation /> | ||
<Container text className="main"> | ||
<Unauthorized /> | ||
</Container> | ||
</> :*/} <> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this either because we have the logic built in below?
frontend/src/pages/blue/index.tsx
Outdated
</Switch> | ||
</Container> | ||
</> | ||
{/* } */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code cleanup.
frontend/src/pages/gold/Problem.tsx
Outdated
{/* <a | ||
{% if submissions['status'] == "accepted" or submissions['status'] == "pending" or not(is_logged_in()) %} | ||
class="icon button ui disabled" | ||
{% else %} | ||
href="/gold/problems/{{ problem.id }}/submit" id="submit" class = "icon button ui" | ||
{% endif %} | ||
data-tooltip="Submit" data-position="top center" data-inverted=""> | ||
<i class="upload icon"></i> | ||
Submit | ||
</a> */} | ||
{/* <a class="icon button ui" id="stats" data-tooltip="Stats" data-position="top center" data-inverted=""> | ||
<i class="chart bar icon"></i> | ||
Stats | ||
</a> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove old Jinja code.
frontend/src/pages/gold/Submit.tsx
Outdated
<Block size='xs-12'> | ||
<Form> | ||
<Input value="scratch" style={{ display: 'none' }} /> | ||
<Input style={{ display: 'none' }} /> {/* value={getuserinfo('scratch_username')}/>*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
frontend/src/pages/gold/Submit.tsx
Outdated
{/* {% for problem in problems %} | ||
<option value="{{ problem['problem_id'] }}">{{ problem['problem_name'] }}</option> | ||
{% endfor %} */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old Jinja code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed commented code that is no longer needed.
- Fixed typos (width, and either),
- Moved check.svg, cross.svg, and question.svg to src/assets rather than using open.kattis.com
- Update JSX.Element returned functions to specify so
- Updated gold Jinja to rudimentary React
Split up backend and frontend to operate independently and function cooperatively.