Compare commits
2 Commits
c84f617e5c
...
5584299d44
| Author | SHA1 | Date | |
|---|---|---|---|
| 5584299d44 | |||
| 97ac27e78a |
@ -23,7 +23,7 @@ impl Fairing for SecurityHeaders {
|
||||
));
|
||||
response.set_header(Header::new(
|
||||
"Content-Security-Policy",
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self' data:; connect-src 'self'; frame-ancestors 'none';",
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; frame-ancestors 'none';",
|
||||
));
|
||||
response.set_header(Header::new(
|
||||
"Permissions-Policy",
|
||||
|
||||
@ -35,7 +35,11 @@ export function FilteredGamesList({
|
||||
const positiveCount = gameToPositive.get(game)?.size || 0;
|
||||
const neutralCount = selectedPeopleCount - positiveCount;
|
||||
const gameData = games.get(game);
|
||||
const price = gameData?.price || 0;
|
||||
if (!gameData) {
|
||||
console.error("no data", game);
|
||||
return null;
|
||||
}
|
||||
const price = gameData.price;
|
||||
|
||||
return (
|
||||
<Link
|
||||
@ -81,7 +85,10 @@ export function FilteredGamesList({
|
||||
padding: "0.2rem 0.6rem",
|
||||
borderRadius: "4px",
|
||||
display: "inline-block",
|
||||
backgroundColor: price === 0 ? "rgba(76, 175, 80, 0.2)" : "rgba(255, 152, 0, 0.2)",
|
||||
backgroundColor:
|
||||
price === 0
|
||||
? "rgba(76, 175, 80, 0.2)"
|
||||
: "rgba(255, 152, 0, 0.2)",
|
||||
color: price === 0 ? "#4caf50" : "#ff9800",
|
||||
fontWeight: 600,
|
||||
}}
|
||||
|
||||
@ -112,9 +112,7 @@ export function useGameFilter(
|
||||
selectedPeople,
|
||||
]);
|
||||
|
||||
const gamesMap = useMemo(() => {
|
||||
return new Map(Object.entries(metaDataRef.current));
|
||||
}, []);
|
||||
const gamesMap = new Map(Object.entries(metaDataRef.current));
|
||||
|
||||
return { filteredGames, gameToPositive: gameToPositiveOpinion, games: gamesMap };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user