Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintcache

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"printWidth": 80,
"arrowParens": "avoid",
"bracketSpacing": true,
"semi": false,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
"useTabs": false
}
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This is a simple web app that based on the [react-boilerplate CRA template](http

It currently has two pages, an index and a `/countries` page which downloads a list of countries from the CareRev API and displays links to a country detail page. Right now the link leads to a 404. Your task is to add the missing route which will download the details for the selected country and display them.

**NOTE:** The task is broken up into smaller steps and shouldn't take more than an hour or two in total. If you find yourself stuck on any step, simply note where you ran into any problems and what you were trying to do so we can discuss it later, then move on to the next step.
**NOTE:** If you find yourself stuck on any step, simply note where you ran into any problems and what you were trying to do so we can discuss it later, then move on to the next step.

1. Get the app running with `yarn install` and `yarn start`
1. Get the app running with `npm install` and `npm start`

2. Add a route for `/country/:id`

Expand All @@ -20,6 +20,12 @@ It currently has two pages, an index and a `/countries` page which downloads a l

7. Display that country's name and currency code in the container when it loads, using the selector(s).

8. Bonus (optional): Add an error view in case the data fetching has a problem.
8. Add an error view in case the data fetching has a problem.

This added container should function roughly like the existing `Countries` container. In the interview, we'll discuss this app, ways to improve it, architectural concepts, best practices and what ideas you think are important in making a strong, reliable and easy to use app.
9. Style the page with tailwind.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will probably need to leave this off until we add in Tailwind


10. Ensure the page meets accessibility standards.

11. Add unit tests.

This added container should function roughly like the existing `Countries` container. In the interview, we'll discuss this app, ways to improve it, architectural concepts, best practices and what ideas you think are important in making a strong, reliable and easy to use app.
16 changes: 8 additions & 8 deletions internals/startingTemplate/src/locales/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import i18next from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import i18next from 'i18next'
import { initReactI18next } from 'react-i18next'
import LanguageDetector from 'i18next-browser-languagedetector'

import en from './en/translation.json';
import { convertLanguageJsonToObject } from './translations';
import en from './en/translation.json'
import { convertLanguageJsonToObject } from './translations'

export const translationsJson = {
en: {
translation: en,
},
};
}

// Create the 'translations' object to provide full intellisense support for the static json files.
convertLanguageJsonToObject(en);
convertLanguageJsonToObject(en)

export const i18n = i18next
// pass the i18n instance to react-i18next.
Expand All @@ -31,4 +31,4 @@ export const i18n = i18next
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
});
})
33 changes: 0 additions & 33 deletions src/app/__tests__/__snapshots__/index.test.tsx.snap

This file was deleted.

14 changes: 0 additions & 14 deletions src/app/__tests__/index.test.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/app/components/A/__tests__/index.test.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions src/app/components/A/index.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/app/components/FormLabel/__tests__/index.test.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/components/FormLabel/index.ts

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions src/app/components/Link/__tests__/index.test.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions src/app/components/Link/index.ts

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions src/app/components/LoadingIndicator/__tests__/index.test.tsx

This file was deleted.

Loading