refactor: use constant for api url
This commit is contained in:
parent
329739b103
commit
c6d886b68b
2 changed files with 18 additions and 1 deletions
16
frontend/src/app/feature/game/dice/dice.component.css
Normal file
16
frontend/src/app/feature/game/dice/dice.component.css
Normal file
|
@ -0,0 +1,16 @@
|
|||
.dice-animation {
|
||||
/* Add basic styling for the animation container */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100px; /* Ensure there's space for the animation */
|
||||
}
|
||||
|
||||
.dice-animation p {
|
||||
animation: spin 1s linear infinite; /* Simple spinning animation */
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
|
@ -2,12 +2,13 @@ import { Injectable } from '@angular/core';
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DiceDto, DiceResult } from './dice.model';
|
||||
import {environment} from "@environments/environment";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DiceService {
|
||||
private apiUrl = '/backend/dice';
|
||||
private apiUrl = `${environment.apiUrl}/dice`;
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
|
|
Reference in a new issue