Update theme and documentation (#7)
* Set default theme to light in `ThemeContext` * Update README and environment configuration files for clarity and completeness and to reflect current project status * Update dark theme colour scheme
This commit is contained in:
committed by
GitHub
parent
7e3b061926
commit
fed1a2f288
5
frontend/.env.example
Normal file
5
frontend/.env.example
Normal file
@@ -0,0 +1,5 @@
|
||||
# Frontend environment variables
|
||||
# Note that in Vite, all environment variables must be prefixed with VITE_ to be exposed to your frontend code.
|
||||
|
||||
VITE_API_URL=http://127.0.0.1:8080/api
|
||||
VITE_STRIPE_PUBLISHABLE_KEY=<insert_your_stripe_publishable_key_here>
|
||||
@@ -89,7 +89,7 @@ body[data-theme="light"] {
|
||||
|
||||
body[data-theme="dark"] {
|
||||
/*Global Background Colour*/
|
||||
background: linear-gradient(to top right, #737787, #0d1e55, #567419);
|
||||
background: linear-gradient(to top right, #0f2058, #020f39, #89058d);
|
||||
--scrollbar-color: rgb(255, 255, 255);
|
||||
--scrollbar-hover: rgb(255, 255, 255);
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ interface ThemeContextType {
|
||||
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
|
||||
|
||||
export const ThemeProvider = ({ children }: { children: ReactNode }) => {
|
||||
// Set default theme to dark
|
||||
// Set default theme to light
|
||||
|
||||
const [theme, setTheme] = useState<string>(() => {
|
||||
// If exist on user cache, use that instead
|
||||
return localStorage.getItem("user-theme") || "dark";
|
||||
return localStorage.getItem("user-theme") || "light";
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user