Compare commits

...

2 Commits

Author SHA1 Message Date
70a4ece5bc
feat: add numbers to RaceChart 2025-03-03 16:05:28 +01:00
406ea9ffdd
feat: remove unnecessary CORS origins 2025-03-03 16:02:44 +01:00
2 changed files with 4 additions and 6 deletions

View File

@ -18,10 +18,8 @@ from security import (
app = FastAPI(title="cutt")
api_router = APIRouter(prefix="/api")
origins = [
"*",
"http://localhost",
"http://localhost:3000",
"http://localhost:8000",
"https://cutt.0124816.xyz",
"http://localhost:5173",
]
app.add_middleware(

View File

@ -64,13 +64,13 @@ const RaceChart: FC<RaceChartProps> = ({ players, std }) => {
paintOrder={"stroke fill"}
fontFamily="monospace"
>
{player.name}
{index + 1}. {player.name}
</text>
<text
key={index}
x={
4 +
Math.max(...players.map((p, _) => p.name.length)) *
(4 + Math.max(...players.map((p, _) => p.name.length))) *
(barHeight - 1.5 * gap) *
0.66
}