🚨 Fixed deepsource issues

This commit is contained in:
Mawoka
2023-06-17 19:31:04 +02:00
parent f20fcb7cb5
commit cff32c8399
9 changed files with 16 additions and 25 deletions
+3
View File
@@ -40,8 +40,11 @@ export const getContrast = (foregroundColor: RGB, backgroundColor: RGB) => {
export const getRgbColorFromHex = (hex: string): RGB => {
hex = hex.slice(1);
const value = parseInt(hex, 16);
// skipcq: JS-C1002
const r = (value >> 16) & 255;
// skipcq: JS-C1002
const g = (value >> 8) & 255;
// skipcq: JS-C1002
const b = value & 255;
return [r, g, b] as RGB;
+1 -1
View File
@@ -1,7 +1,7 @@
import { signedIn } from '$lib/stores';
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ locals }) => {
export const load: LayoutServerLoad = ({ locals }) => {
if (locals.email) {
signedIn.set(true);
} else {
@@ -6,7 +6,7 @@
import type { PageServerLoad } from './$types';
export const load = (async ({ setHeaders }) => {
export const load = (({ setHeaders }) => {
setHeaders({
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin'