Created
August 8, 2019 16:53
-
-
Save vsavkin/b55a15b895d99bdb2da4a38d7f531a85 to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import styled from 'styled-components'; | |
const StyledApp = styled.div` | |
... | |
`; | |
type Ticket = { | |
title: string; | |
id: number; | |
}; | |
export const App = () => { | |
const tickets: Ticket[] = [ | |
{ | |
title: `Install updates`, | |
id: 1 | |
}, | |
{ | |
title: `Restore the backup`, | |
id: 2 | |
} | |
]; | |
return ( | |
<StyledApp> | |
<header className="flex"> | |
<h1>Welcome to tickets!</h1> | |
</header> | |
<main> | |
{tickets.map(t => ( | |
<p className="ticket flex" key={t.id}> | |
{t.title} | |
</p> | |
))} | |
</main> | |
</StyledApp> | |
); | |
}; | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment