Changeset 87614a5 for pages


Ignore:
Timestamp:
06/11/22 12:46:20 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
64dc53b
Parents:
6568bde
Message:

Blackjack prototype

Location:
pages
Files:
5 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • pages/_app.js

    r6568bde r87614a5  
    11import '../styles/globals.css'
    22
     3import { store } from '../redux/store'
     4import { Provider } from 'react-redux'
     5
    36function MyApp({ Component, pageProps }) {
    4   return <Component {...pageProps} />
     7  return (
     8    <Provider store={store}>
     9      <Component {...pageProps} />
     10    </Provider>
     11  )
    512}
    613
  • pages/index.js

    r6568bde r87614a5  
     1import Header from '../components/Header'
     2import FullwidthText from '../components/FullwidthText'
     3import GameCircle from '../components/GameCircle'
     4import Loading from '../components/Loading'
     5import RegisterScreen from '../components/RegisterScreen'
     6import LoginScreen from '../components/LoginScreen'
     7import Alert from '../components/Alert'
     8import Notification from '../components/Notification'
     9import Stats from '../components/Stats'
     10
    111import Head from 'next/head'
    2 import Image from 'next/image'
    3 import styles from '../styles/Home.module.css'
     12
     13import { useDispatch } from 'react-redux'
     14import ManageCredits from '../components/ManageCredits'
    415
    516export default function Home() {
     17  const dispatch = useDispatch();
     18
    619  return (
    7     <div className={styles.container}>
     20    <div className="app" style={{backgroundImage: 'url("/images/bg.png")'}}>
    821      <Head>
    9         <title>Create Next App</title>
    10         <meta name="description" content="Generated by create next app" />
    11         <link rel="icon" href="/favicon.ico" />
     22        <title>Caessino</title>
    1223      </Head>
     24 
     25      <Header/>
     26     
     27      <FullwidthText title="Welcome to Caessino" subtitle="Choose Your Game"/>
    1328
    14       <main className={styles.main}>
    15         <h1 className={styles.title}>
    16           Welcome to <a href="https://nextjs.org">Next.js!</a>
    17         </h1>
     29      <div className="gameCircles">
     30        <GameCircle src={"/images/blackjack.png"} text="Play Blackjack" routeTo="/games/blackjack" game="Blackjack"/>
     31        <GameCircle src={"/images/roulette.png"} text="Play Roulette" routeTo="/games/roulette" game="Roulette"/>
     32        <GameCircle src={"/images/poker.png"} text="Play Poker" routeTo="/games/poker" game="Poker"/>
     33      </div>
    1834
    19         <p className={styles.description}>
    20           Get started by editing{' '}
    21           <code className={styles.code}>pages/index.js</code>
    22         </p>
     35      <Loading/>
    2336
    24         <div className={styles.grid}>
    25           <a href="https://nextjs.org/docs" className={styles.card}>
    26             <h2>Documentation &rarr;</h2>
    27             <p>Find in-depth information about Next.js features and API.</p>
    28           </a>
     37      <RegisterScreen/>
    2938
    30           <a href="https://nextjs.org/learn" className={styles.card}>
    31             <h2>Learn &rarr;</h2>
    32             <p>Learn about Next.js in an interactive course with quizzes!</p>
    33           </a>
     39      <LoginScreen/>
    3440
    35           <a
    36             href="https://github.com/vercel/next.js/tree/canary/examples"
    37             className={styles.card}
    38           >
    39             <h2>Examples &rarr;</h2>
    40             <p>Discover and deploy boilerplate example Next.js projects.</p>
    41           </a>
     41      <Alert/>
    4242
    43           <a
    44             href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
    45             className={styles.card}
    46           >
    47             <h2>Deploy &rarr;</h2>
    48             <p>
    49               Instantly deploy your Next.js site to a public URL with Vercel.
    50             </p>
    51           </a>
    52         </div>
    53       </main>
     43      <Notification/>
    5444
    55       <footer className={styles.footer}>
    56         <a
    57           href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
    58           target="_blank"
    59           rel="noopener noreferrer"
    60         >
    61           Powered by{' '}
    62           <span className={styles.logo}>
    63             <Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
    64           </span>
    65         </a>
    66       </footer>
     45      <Stats/>
     46
     47      <ManageCredits/>
    6748    </div>
    6849  )
Note: See TracChangeset for help on using the changeset viewer.