-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrate JSON configs to YAML #106
Conversation
@@ -1,7 +1,7 @@ | |||
import React, { Fragment } from "react"; | |||
import styled from "styled-components"; | |||
import { teamMembersStyle } from "./TeamMembers.style"; | |||
import settings from "../../../../settings/settings"; | |||
import config from "../../../../config/config.yml"; |
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.
I'm wondering if it's a good idea to read the config from yml all the time. How about a wrapper that reads it once?
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.
Please take a look at the changes. I've created a top-level context that's responsible for reading the file once and expose it to its child components. I don't think it's required to use memoization though.
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.
I don't think it's required to use memoization though.
Yea, I've rather removed useMemo()
.
Tasks that have yet to be done to make the PR ready for review:
|
src/components/TeamContributionCalendarDisplayer/TeamContributionCalendarDisplayer.js
Show resolved
Hide resolved
It'd be great to make it less error-prone though, i.e. the const slashRequired = proxy[proxy.length -1] === "/";
const feedUrl = `${proxy}{${slashRequired} ? "/" : ""}https://medium.com/feed/${username}`; How about something like the above? Or let's just mention it somewhere in the doc. |
The proper way of dealing with this is through a library that can parse and construct URLs/URIs. They should have a method for adding paths. |
Expose the 'CONFIG' secret for the 'pre:deploy' script.
It's no longer required to ouput a `.nojekyll` file.
Deployment keys should be used for deployment because server-to-server requests don't trigger a page build.
Gotcha, thanks. dotdev/src/components/Medium/utils/MediumUtils.js Lines 6 to 12 in de0369f
|
Issue #91.