main
Last change
on this file since 87614a5 was 87614a5, checked in by anastasovv <simon@…>, 2 years ago |
Blackjack prototype
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | import React from 'react'
|
---|
2 |
|
---|
3 | import { ArcText } from '@arctext/react'
|
---|
4 |
|
---|
5 | import { useRouter } from 'next/router'
|
---|
6 |
|
---|
7 | import { useState } from 'react'
|
---|
8 |
|
---|
9 | import { setInGame } from '../redux/reducers/playerSlice'
|
---|
10 | import { useDispatch } from 'react-redux'
|
---|
11 | import FullwidthText from './FullwidthText'
|
---|
12 |
|
---|
13 | const GameCircle = ( { src, text, routeTo, game } ) => {
|
---|
14 | const router = useRouter()
|
---|
15 |
|
---|
16 | function clicked() {
|
---|
17 | router.push(routeTo)
|
---|
18 | }
|
---|
19 |
|
---|
20 | return (
|
---|
21 | <div className="gameCircle" onClick={() => clicked()}>
|
---|
22 | <div className="circleLarge">
|
---|
23 | <div className="circle" style={{backgroundImage: `url('${src}')`}}>
|
---|
24 |
|
---|
25 | </div>
|
---|
26 | </div>
|
---|
27 | <h3>
|
---|
28 | <ArcText
|
---|
29 | text={text}
|
---|
30 | upsideDown
|
---|
31 | width={600}
|
---|
32 | characterWidth={4.8}
|
---|
33 | style={{color: 'white',
|
---|
34 | position: 'relative',
|
---|
35 | transform: 'rotateZ(180deg) scaleX(-1)',
|
---|
36 | marginTop: '30px',
|
---|
37 | fontSize: '1.6rem',
|
---|
38 | color: '#FFD700',
|
---|
39 | fontWeight: 'bold'
|
---|
40 | }}
|
---|
41 | />
|
---|
42 | </h3>
|
---|
43 | </div>
|
---|
44 | )
|
---|
45 | }
|
---|
46 |
|
---|
47 | export default GameCircle |
---|
Note:
See
TracBrowser
for help on using the repository browser.