mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-15 08:24:51 +00:00
use consistent React import style
This commit is contained in:
parent
8cb98a5b46
commit
660addc5da
2 changed files with 12 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { ReactNode } from "react";
|
||||||
import "./style.css";
|
import "./style.css";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
|
|
@ -5,11 +6,7 @@ export const metadata = {
|
||||||
description: "Tribes 2 forever.",
|
description: "Tribes 2 forever.",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||||
children,
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>{children}</body>
|
<body>{children}</body>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
import React, { useContext, useEffect, useMemo, useState } from "react";
|
import {
|
||||||
|
createContext,
|
||||||
|
ReactNode,
|
||||||
|
useContext,
|
||||||
|
useEffect,
|
||||||
|
useMemo,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
|
|
||||||
const SettingsContext = React.createContext(null);
|
const SettingsContext = createContext(null);
|
||||||
|
|
||||||
type PersistedSettings = {
|
type PersistedSettings = {
|
||||||
fogEnabled?: boolean;
|
fogEnabled?: boolean;
|
||||||
|
|
@ -13,7 +20,7 @@ export function useSettings() {
|
||||||
return useContext(SettingsContext);
|
return useContext(SettingsContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SettingsProvider({ children }: { children: React.ReactNode }) {
|
export function SettingsProvider({ children }: { children: ReactNode }) {
|
||||||
const [fogEnabled, setFogEnabled] = useState(true);
|
const [fogEnabled, setFogEnabled] = useState(true);
|
||||||
const [speedMultiplier, setSpeedMultiplier] = useState(1);
|
const [speedMultiplier, setSpeedMultiplier] = useState(1);
|
||||||
const [fov, setFov] = useState(90);
|
const [fov, setFov] = useState(90);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue