Skip to content

Commit

Permalink
try to fix jotai error on server
Browse files Browse the repository at this point in the history
  • Loading branch information
davidar committed Nov 25, 2023
1 parent 2054351 commit 3efc066
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/buttons/fullscreenbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import FullscreenIcon from '@mui/icons-material/Fullscreen';
import Button from '@mui/material/Button';
import { useTheme } from '@mui/material/styles';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/hotreloadtoggle.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import AcUnit from '@mui/icons-material/AcUnit';
import LocalFireDepartment from '@mui/icons-material/LocalFireDepartment';
import Button from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/playpausebutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import PauseCircleIcon from '@mui/icons-material/PauseCircle';
import PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline';
import Button from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/recordbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import RadioButtonChecked from '@mui/icons-material/RadioButtonChecked';
import Button from '@mui/material/Button';
import { useTheme } from '@mui/material/styles';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/reloadbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import PlayArrowRounded from '@mui/icons-material/PlayArrowRounded';
import PlayDisabledRounded from '@mui/icons-material/PlayDisabledRounded';
import Button from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/resetbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import ReplayIcon from '@mui/icons-material/Replay';
import Button from '@mui/material/Button';
import { useTheme } from '@mui/material/styles';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/scalebutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Hd from '@mui/icons-material/Hd';
import Sd from '@mui/icons-material/Sd';
import Button from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions components/buttons/vimbutton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Button from '@mui/material/Button';
import { useTheme } from '@mui/material/styles';
import SvgIcon from '@mui/material/SvgIcon';
Expand Down
1 change: 1 addition & 0 deletions components/editor/configurationpicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import LineStyleIcon from '@mui/icons-material/LineStyle';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
Expand Down
1 change: 1 addition & 0 deletions components/editor/editor.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
// MUI sizing from refs:
// https://github.com/mui/material-ui/issues/15662

Expand Down
1 change: 1 addition & 0 deletions components/editor/entrypointdisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Timeline from '@mui/lab/Timeline';
import TimelineConnector from '@mui/lab/TimelineConnector';
import TimelineContent from '@mui/lab/TimelineContent';
Expand Down
1 change: 1 addition & 0 deletions components/editor/explainer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import DisabledByDefaultSharp from '@mui/icons-material/DisabledByDefaultSharp';
import QuestionMarkIcon from '@mui/icons-material/QuestionMark';
import Button from '@mui/material/Button';
Expand Down
1 change: 1 addition & 0 deletions components/editor/metadataeditor.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Button from '@mui/material/Button';
import FormControl from '@mui/material/FormControl';
import Grid from '@mui/material/Grid';
Expand Down
1 change: 1 addition & 0 deletions components/editor/monaco.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Editor from '@monaco-editor/react';
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import { useTransientAtom } from 'jotai-game';
Expand Down
1 change: 1 addition & 0 deletions components/editor/texturepicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import DisabledByDefaultSharp from '@mui/icons-material/DisabledByDefaultSharp';
import ImageList from '@mui/material/ImageList';
import ImageListItem from '@mui/material/ImageListItem';
Expand Down
1 change: 1 addition & 0 deletions components/editor/uniformsliders.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import AddIcon from '@mui/icons-material/Add';
import ClearIcon from '@mui/icons-material/Clear';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
Expand Down
1 change: 1 addition & 0 deletions components/global/shadowcanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { atom, useSetAtom } from 'jotai';
import { useCallback } from 'react';
import { getDimensions } from 'types/canvasdimensions';
Expand Down
1 change: 1 addition & 0 deletions components/resolution.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { useAtomValue } from 'jotai';
import { heightAtom, scaleAtom, widthAtom } from 'lib/atoms/atoms';
import { Fragment } from 'react';
Expand Down
1 change: 1 addition & 0 deletions components/timer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Box from '@mui/material/Box';
import { useAtomValue } from 'jotai';
import { useTransientAtom } from 'jotai-game';
Expand Down
1 change: 1 addition & 0 deletions components/wgputoy.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import WarningIcon from '@mui/icons-material/Warning';
import Skeleton from '@mui/material/Skeleton';
import Stack from '@mui/material/Stack';
Expand Down
1 change: 1 addition & 0 deletions components/wgputoycontroller.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import useResizeObserver from '@react-hook/resize-observer';
import { atom, useAtom, useAtomValue, useSetAtom } from 'jotai';
import { useTransientAtom } from 'jotai-game';
Expand Down
1 change: 1 addition & 0 deletions lib/atoms/atoms.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { UniformSliderRef } from 'components/editor/uniformsliders';
import { atom } from 'jotai';
import { atomWithReset } from 'jotai/utils';
Expand Down
1 change: 1 addition & 0 deletions lib/atoms/wgputoyatoms.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { atom } from 'jotai';
import { WgpuToyRenderer } from 'lib/wgputoy';
import { getDimensions } from '../../types/canvasdimensions';
Expand Down
1 change: 1 addition & 0 deletions lib/db/serializeshader.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { UniformSliderRef } from 'components/editor/uniformsliders';
import { atom, Getter, useAtomValue, useSetAtom } from 'jotai';
import { useResetAtom } from 'jotai/utils';
Expand Down
1 change: 1 addition & 0 deletions pages/new.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Editor from 'components/editor/editor';
import { useSetAtom } from 'jotai';
import { codeNeedSaveAtom, dbLoadedAtom, manualReloadAtom, shaderIDAtom } from 'lib/atoms/atoms';
Expand Down
1 change: 1 addition & 0 deletions pages/view/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import Editor from 'components/editor/editor';
import { fromUniformActiveSettings } from 'components/editor/uniformsliders';
import { useSetAtom } from 'jotai';
Expand Down
1 change: 1 addition & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider } from '@mui/material/styles';
import Editor from 'components/editor/editor';
Expand Down
1 change: 1 addition & 0 deletions theme/itemwithtransition.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { PaperProps } from '@mui/material/Paper';
import { useAtom, WritableAtom } from 'jotai';
import { Item, theme } from './theme';
Expand Down

0 comments on commit 3efc066

Please sign in to comment.