Skip to content

Commit

Permalink
refactor: shuffle things around in builder feature
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Mar 3, 2024
1 parent 832af96 commit b5e823f
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import Dialog from '@mui/material/Dialog'
import { CUSTOM_COMPONENT } from '@services/queries/config'
import { useMemory } from '@hooks/useMemory'
import { useLayoutStore } from '@hooks/useLayoutStore'
import { CustomDialog } from '@features/builder/CustomDialog'
import { CustomTile } from '@features/builder/CustomTile'
import { Loading } from '@components/Loading'

import { Loading } from '../Loading'
import { CustomDialog } from './components/CustomDialog'
import { CustomTile } from './components/CustomTile'

const DEFAULT = {
settings: {},
Expand All @@ -21,7 +21,7 @@ const DEFAULT = {

const handleClose = () => useLayoutStore.setState({ donorPage: false })

export default function DonorPage() {
export function DonorPage() {
const open = useLayoutStore((s) => s.donorPage)
const isMobile = useMemory((s) => s.isMobile)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Grid from '@mui/material/Unstable_Grid2'
import { useQuery } from '@apollo/client'

import { CUSTOM_COMPONENT } from '@services/queries/config'
import { CustomTile } from '@features/builder/CustomTile'
import { CustomTile } from '@features/builder/components/CustomTile'
import { Loading } from '@components/Loading'

export function CustomLoginPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { useLayoutStore } from '@hooks/useLayoutStore'
import { useStorage } from '@hooks/useStorage'
import { CUSTOM_COMPONENT, MOTD_CHECK } from '@services/queries/config'
import Utility from '@services/Utility'
import { CustomDialog } from '@features/builder/CustomDialog'
import { CustomTile } from '@features/builder/CustomTile'
import { CustomDialog } from '@features/builder/components/CustomDialog'
import { CustomTile } from '@features/builder/components/CustomTile'

import { Loading } from '../Loading'
import { Loading } from '../../components/Loading'

const DEFAULT =
/** @type {import('@rm/types').Config['map']['messageOfTheDay']} */ ({
Expand All @@ -24,7 +24,7 @@ const DEFAULT =
index: 0,
})

export default function MessageOfTheDay() {
export function MessageOfTheDay() {
const clientIndex = useStorage((s) => s.motdIndex)
const tutorial = useStorage((s) => s.tutorial)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions src/features/builder/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export * from './CustomTile'
export * from './CustomDialog'
export * from './DonorPage'
export * from './Motd'
export * from './LoginPage'
export * from './components/CustomTile'
export * from './components/CustomDialog'
2 changes: 1 addition & 1 deletion src/pages/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Box from '@mui/material/Box'

import { useMemory } from '@hooks/useMemory'
import ThemeToggle from '@components/ThemeToggle'
import { CustomLoginPage } from '@features/builder/LoginPage'

import { CustomLoginPage } from './CustomPage'
import { DefaultLoginPage } from './DefaultPage'

export default function LoginPage() {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/map/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import UserOptions from '@components/dialogs/UserOptions'
import Tutorial from '@features/tutorial'
import UserProfile from '@features/profile'
import Search from '@features/search'
import MessageOfTheDay from '@components/dialogs/Motd'
import DonorPage from '@components/dialogs/DonorPage'
import MessageOfTheDay from '@features/builder/Motd'
import DonorPage from '@features/builder/DonorPage'
import Feedback from '@components/dialogs/Feedback'
import ResetFilters from '@components/dialogs/ResetFilters'
import ScanDialog from '@features/scanner/ScanDialog'
Expand Down
3 changes: 1 addition & 2 deletions src/pages/playground/components/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import * as React from 'react'
import Grid from '@mui/material/Unstable_Grid2'
import { useTranslation } from 'react-i18next'

import CustomTile from '@features/builder/CustomTile'
import CustomDialog from '@features/builder/CustomDialog'
import { CustomTile, CustomDialog } from '@features/builder'
import ErrorBoundary from '@components/ErrorBoundary'

import { useSafeParse } from '../hooks/useSafeParse'
Expand Down

0 comments on commit b5e823f

Please sign in to comment.