Attempt to at move app into app sub dir
This commit is contained in:
22
app/web/src/components/OutBound/OutBound.js
Normal file
22
app/web/src/components/OutBound/OutBound.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import ReactGA from 'react-ga'
|
||||
|
||||
const OutBound = ({ className, children, to }) => {
|
||||
return (
|
||||
<a
|
||||
className={className}
|
||||
target="_blank"
|
||||
href={to}
|
||||
onClick={() => {
|
||||
ReactGA.event({
|
||||
category: 'outbound',
|
||||
action: to,
|
||||
})
|
||||
return true
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
||||
export default OutBound
|
||||
7
app/web/src/components/OutBound/OutBound.stories.js
Normal file
7
app/web/src/components/OutBound/OutBound.stories.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import OutBound from './OutBound'
|
||||
|
||||
export const generated = () => {
|
||||
return <OutBound />
|
||||
}
|
||||
|
||||
export default { title: 'Components/OutBound' }
|
||||
11
app/web/src/components/OutBound/OutBound.test.js
Normal file
11
app/web/src/components/OutBound/OutBound.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { render } from '@redwoodjs/testing'
|
||||
|
||||
import OutBound from './OutBound'
|
||||
|
||||
describe('OutBound', () => {
|
||||
it('renders successfully', () => {
|
||||
expect(() => {
|
||||
render(<OutBound />)
|
||||
}).not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user