/src/services/index/pages/index.tsx

https://github.com/tonyfromundefined/next-starter · TypeScript · 71 lines · 64 code · 7 blank · 0 comment · 0 complexity · 82e6ae70b8463c9d83490035d6a45005 MD5 · raw file

  1. import styled from '~/styled'
  2. import Pikachu from '../components/Pikachu'
  3. import { useStore } from '../store'
  4. export default function PageIndex() {
  5. const store = useStore()
  6. return (
  7. <Container>
  8. <Title>Next.js Starter</Title>
  9. <Line>
  10. <Code>Next.js</Code>
  11. <Code>TypeScript</Code>
  12. <Code>Babel</Code>
  13. <Code>Express.js</Code>
  14. <Code>Apollo Client</Code>
  15. <Code>React Apollo</Code>
  16. <Code>React Apollo Hooks</Code>
  17. <Code>GraphQL Codegen</Code>
  18. <Code>MobX</Code>
  19. <Code>mobx-state-tree</Code>
  20. <Code>styled-components</Code>
  21. <Code>next-optimized-images</Code>
  22. <Code>Serverless Framework</Code>
  23. <Code>AWS Lambda</Code>
  24. <Code>Dotenv</Code>
  25. </Line>
  26. <Line>version: {store.environments.get('NEXT_APP_VERSION')}</Line>
  27. <Line>by <Author>@tonyfromundefined</Author></Line>
  28. <Pikachu />
  29. </Container>
  30. )
  31. }
  32. const Container = styled.div`
  33. padding: 1rem;
  34. `
  35. const Title = styled.h1`
  36. font-size: 2rem;
  37. margin: 0 0 1rem;
  38. `
  39. const Line = styled.div`
  40. margin: .5rem 0 0;
  41. font-size: .875rem;
  42. `
  43. const Code = styled.div`
  44. font-family: monospace;
  45. display: inline-block;
  46. background-color: ${(props) => props.theme.blue[0]};
  47. color: ${(props) => props.theme.blue[8]};
  48. font-size: .75rem;
  49. border-radius: .125rem;
  50. padding: .0625rem .125rem;
  51. margin-right: .25rem;
  52. font-weight: 700;
  53. `
  54. const Author = styled.div`
  55. font-family: monospace;
  56. display: inline-block;
  57. background-color: ${(props) => props.theme.green[0]};
  58. color: ${(props) => props.theme.green[8]};
  59. font-size: .75rem;
  60. border-radius: .125rem;
  61. padding: .0625rem .125rem;
  62. margin-right: .25rem;
  63. font-weight: 700;
  64. `