forked from Lateral-Link/haistack-coding-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from andrecego/feat/initial-project-configs
Initial setup for project
- Loading branch information
Showing
10 changed files
with
58 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Run this example by adding <%= javascript_pack_tag 'hello_react' %> to the head of your layout file, | ||
// like app/views/layouts/application.html.erb. All it does is render <div>Hello React</div> at the bottom | ||
// of the page. | ||
|
||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
import Main from '@/main.jsx' | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
createRoot(document.getElementById('root')).render(<Main />) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.main { | ||
padding: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import './main.css' | ||
|
||
const Main = props => ( | ||
<div className='main'>Hello {props.name}!</div> | ||
) | ||
|
||
Main.defaultProps = { | ||
name: 'World' | ||
} | ||
|
||
Main.propTypes = { | ||
name: PropTypes.string | ||
} | ||
|
||
export default Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
<h1>Haistack Coding Challenge</h1> | ||
|
||
<p>Coding challenge presented to candidates interviewing for a role at <a href="https://www.linkedin.com/company/haistack/">Haistack.AI</a>.</p> | ||
|
||
<p><em>#findyourneedle</em></p> | ||
|
||
<p>Copyright 2023 <a href="https://www.linkedin.com/company/haistack/">Haistack.AI</a></p> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
const { environment } = require('@rails/webpacker') | ||
|
||
const path = require('path') | ||
|
||
// Add alias for @ symbol | ||
environment.config.set('resolve.alias', { | ||
'@': path.resolve(__dirname, '..', '..', 'app/javascript/src') | ||
}) | ||
|
||
module.exports = environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"target": "ES6", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["app/javascript/src/*"] | ||
} | ||
}, | ||
"exclude": ["node_modules"], | ||
} |
This file was deleted.
Oops, something went wrong.