2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-10 22:00:56 +00:00

fix spotlight

This commit is contained in:
Matthias Mair
2024-04-15 01:53:38 +02:00
parent 8f3dac7f16
commit b34ebd8557
2 changed files with 18 additions and 18 deletions

View File

@@ -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,14 +46,6 @@ export default function LayoutComponent() {
return ( return (
<ProtectedRoute> <ProtectedRoute>
<SpotlightProvider
actions={actions}
onActionsChange={actionsAreChanging}
searchIcon={<IconSearch size="1.2rem" />}
searchPlaceholder={t`Search...`}
shortcut={['mod + K', '/']}
nothingFoundMessage={t`Nothing found...`}
>
<Flex direction="column" mih="100vh"> <Flex direction="column" mih="100vh">
<Header /> <Header />
<Container className={classes.layoutContent} size="100%"> <Container className={classes.layoutContent} size="100%">
@@ -61,8 +53,15 @@ export default function LayoutComponent() {
</Container> </Container>
<Space h="xl" /> <Space h="xl" />
<Footer /> <Footer />
<Spotlight
actions={actions}
//onActionsChange={actionsAreChanging}
//searchIcon={<IconSearch size="1.2rem" />}
//searchPlaceholder={t`Search...`}
shortcut={['mod + K', '/']}
//nothingFoundMessage={t`Nothing found...`}
/>
</Flex> </Flex>
</SpotlightProvider>
</ProtectedRoute> </ProtectedRoute>
); );
} }

View File

@@ -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';