mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
fix linting
This commit is contained in:
parent
067c26f271
commit
517c1b76f4
@ -1,10 +1,4 @@
|
|||||||
import {
|
import { createContext, useContext, useEffect, useMemo, useState } from "react";
|
||||||
createContext,
|
|
||||||
useContext,
|
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
|
|
||||||
type Theme = "dark" | "light" | "system";
|
type Theme = "dark" | "light" | "system";
|
||||||
@ -130,9 +124,9 @@ export function ThemeProvider({
|
|||||||
?.filter((f) => /^[a-zA-Z0-9._-]+\.css$/.test(f))
|
?.filter((f) => /^[a-zA-Z0-9._-]+\.css$/.test(f))
|
||||||
.map((f) => {
|
.map((f) => {
|
||||||
const base = f.replace(/\.css$/, "");
|
const base = f.replace(/\.css$/, "");
|
||||||
return (base.startsWith("theme-")
|
return (
|
||||||
? base
|
base.startsWith("theme-") ? base : `theme-${base}`
|
||||||
: `theme-${base}`) as ColorScheme;
|
) as ColorScheme;
|
||||||
}) ?? [];
|
}) ?? [];
|
||||||
|
|
||||||
return [...colorSchemes, ...customSchemes];
|
return [...colorSchemes, ...customSchemes];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user