Compare commits
No commits in common. "5584299d44d3dc7caa184b23d3853e2ea89d80ec" and "c84f617e5c03f33f832675ebc042d858c6205466" have entirely different histories.
5584299d44
...
c84f617e5c
@ -23,7 +23,7 @@ impl Fairing for SecurityHeaders {
|
|||||||
));
|
));
|
||||||
response.set_header(Header::new(
|
response.set_header(Header::new(
|
||||||
"Content-Security-Policy",
|
"Content-Security-Policy",
|
||||||
"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';",
|
"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';",
|
||||||
));
|
));
|
||||||
response.set_header(Header::new(
|
response.set_header(Header::new(
|
||||||
"Permissions-Policy",
|
"Permissions-Policy",
|
||||||
|
|||||||
@ -35,11 +35,7 @@ export function FilteredGamesList({
|
|||||||
const positiveCount = gameToPositive.get(game)?.size || 0;
|
const positiveCount = gameToPositive.get(game)?.size || 0;
|
||||||
const neutralCount = selectedPeopleCount - positiveCount;
|
const neutralCount = selectedPeopleCount - positiveCount;
|
||||||
const gameData = games.get(game);
|
const gameData = games.get(game);
|
||||||
if (!gameData) {
|
const price = gameData?.price || 0;
|
||||||
console.error("no data", game);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const price = gameData.price;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
@ -85,10 +81,7 @@ export function FilteredGamesList({
|
|||||||
padding: "0.2rem 0.6rem",
|
padding: "0.2rem 0.6rem",
|
||||||
borderRadius: "4px",
|
borderRadius: "4px",
|
||||||
display: "inline-block",
|
display: "inline-block",
|
||||||
backgroundColor:
|
backgroundColor: price === 0 ? "rgba(76, 175, 80, 0.2)" : "rgba(255, 152, 0, 0.2)",
|
||||||
price === 0
|
|
||||||
? "rgba(76, 175, 80, 0.2)"
|
|
||||||
: "rgba(255, 152, 0, 0.2)",
|
|
||||||
color: price === 0 ? "#4caf50" : "#ff9800",
|
color: price === 0 ? "#4caf50" : "#ff9800",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -112,7 +112,9 @@ export function useGameFilter(
|
|||||||
selectedPeople,
|
selectedPeople,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const gamesMap = new Map(Object.entries(metaDataRef.current));
|
const gamesMap = useMemo(() => {
|
||||||
|
return new Map(Object.entries(metaDataRef.current));
|
||||||
|
}, []);
|
||||||
|
|
||||||
return { filteredGames, gameToPositive: gameToPositiveOpinion, games: gamesMap };
|
return { filteredGames, gameToPositive: gameToPositiveOpinion, games: gamesMap };
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user