player infos
This commit is contained in:
		
							parent
							
								
									45b4c7f7fc
								
							
						
					
					
						commit
						aba4dcb570
					
				
					 2 changed files with 19 additions and 7 deletions
				
			
		|  | @ -21,18 +21,28 @@ export default function PlayerInfo({ playerId }: { playerId: string }) { | |||
|         <div className="ScoreForm"> | ||||
|             <div className='ElemGroup'> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     name | ||||
|                     name: | ||||
|                 </p> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     {player?.name} | ||||
|                 </p> | ||||
|             </div> | ||||
|             <div className='ElemGroup'></div> | ||||
|             <p className='Elems' style={{ "color": "white" }}> | ||||
|                 {JSON.stringify(player)} | ||||
|             </p> | ||||
| 
 | ||||
| 
 | ||||
|             <div className='ElemGroup'> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     kills: | ||||
|                 </p> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     {player?.kills} | ||||
|                 </p> | ||||
|             </div> | ||||
|             <div className='ElemGroup'> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     deaths: | ||||
|                 </p> | ||||
|                 <p className='Elems' style={{ "color": "white" }}> | ||||
|                     {player?.deaths} | ||||
|                 </p> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div >; | ||||
| } | ||||
|  |  | |||
|  | @ -1,6 +1,8 @@ | |||
| export type PlayerResponse = { | ||||
|     readonly name: string; | ||||
|     readonly id: string; | ||||
|     readonly kills: number; | ||||
|     readonly deaths: number; | ||||
| }; | ||||
| 
 | ||||
| export async function fetchTyped<T>({ url, method }: { url: URL; method: string; }) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ronja Spiegelberg
						Ronja Spiegelberg