mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	fix spotlight
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { t } from '@lingui/macro';
 | 
					import { t } from '@lingui/macro';
 | 
				
			||||||
import { Container, Flex, Space } from '@mantine/core';
 | 
					import { Container, Flex, Space } from '@mantine/core';
 | 
				
			||||||
import { SpotlightProvider } from '@mantine/spotlight';
 | 
					import { Spotlight } from '@mantine/spotlight';
 | 
				
			||||||
import { IconSearch } from '@tabler/icons-react';
 | 
					import { IconSearch } from '@tabler/icons-react';
 | 
				
			||||||
import { useEffect, useState } from 'react';
 | 
					import { useEffect, useState } from 'react';
 | 
				
			||||||
import { Navigate, Outlet, useLocation, useNavigate } from 'react-router-dom';
 | 
					import { Navigate, Outlet, useLocation, useNavigate } from 'react-router-dom';
 | 
				
			||||||
@@ -46,23 +46,22 @@ export default function LayoutComponent() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <ProtectedRoute>
 | 
					    <ProtectedRoute>
 | 
				
			||||||
      <SpotlightProvider
 | 
					      <Flex direction="column" mih="100vh">
 | 
				
			||||||
        actions={actions}
 | 
					        <Header />
 | 
				
			||||||
        onActionsChange={actionsAreChanging}
 | 
					        <Container className={classes.layoutContent} size="100%">
 | 
				
			||||||
        searchIcon={<IconSearch size="1.2rem" />}
 | 
					          <Outlet />
 | 
				
			||||||
        searchPlaceholder={t`Search...`}
 | 
					        </Container>
 | 
				
			||||||
        shortcut={['mod + K', '/']}
 | 
					        <Space h="xl" />
 | 
				
			||||||
        nothingFoundMessage={t`Nothing found...`}
 | 
					        <Footer />
 | 
				
			||||||
      >
 | 
					        <Spotlight
 | 
				
			||||||
        <Flex direction="column" mih="100vh">
 | 
					          actions={actions}
 | 
				
			||||||
          <Header />
 | 
					          //onActionsChange={actionsAreChanging}
 | 
				
			||||||
          <Container className={classes.layoutContent} size="100%">
 | 
					          //searchIcon={<IconSearch size="1.2rem" />}
 | 
				
			||||||
            <Outlet />
 | 
					          //searchPlaceholder={t`Search...`}
 | 
				
			||||||
          </Container>
 | 
					          shortcut={['mod + K', '/']}
 | 
				
			||||||
          <Space h="xl" />
 | 
					          //nothingFoundMessage={t`Nothing found...`}
 | 
				
			||||||
          <Footer />
 | 
					        />
 | 
				
			||||||
        </Flex>
 | 
					      </Flex>
 | 
				
			||||||
      </SpotlightProvider>
 | 
					 | 
				
			||||||
    </ProtectedRoute>
 | 
					    </ProtectedRoute>
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
import '@mantine/core/styles.css';
 | 
					import '@mantine/core/styles.css';
 | 
				
			||||||
 | 
					import '@mantine/spotlight/styles.css';
 | 
				
			||||||
import * as Sentry from '@sentry/react';
 | 
					import * as Sentry from '@sentry/react';
 | 
				
			||||||
import React from 'react';
 | 
					import React from 'react';
 | 
				
			||||||
import ReactDOM from 'react-dom/client';
 | 
					import ReactDOM from 'react-dom/client';
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user