Skip to content

Commit

Permalink
Fixed format + lint
Browse files Browse the repository at this point in the history
  • Loading branch information
msenechal committed Mar 3, 2024
1 parent c9defc8 commit e04c016
Showing 1 changed file with 55 additions and 63 deletions.
118 changes: 55 additions & 63 deletions src/templates/cybersecurity/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Widget,
} from '@neo4j-ndl/react';
import { MagnifyingGlassIconOutline, InformationCircleIconOutline } from '@neo4j-ndl/react/icons';
import { createColumnHelper, getCoreRowModel, getSortedRowModel, useReactTable, Table } from '@tanstack/react-table';
import { createColumnHelper, getCoreRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';

import productsData from './assets/networkimpact.json';
import NoGraphImg from '../shared/assets/NoData.png';
Expand All @@ -26,8 +26,6 @@ type NetworkImpact = {
Status: string;
};



const columnHelper = createColumnHelper<NetworkImpact>();

const columns = [
Expand Down Expand Up @@ -105,20 +103,14 @@ export default function Home() {

return (
<>
<Header
title='CyberSecurity'
navItems={[]}
useNeo4jConnect={false}
userHeader={false}
/>
<Header title='CyberSecurity' navItems={[]} useNeo4jConnect={false} userHeader={false} />

<div className='landing-page n-bg-palette-neutral-bg-default'>
<form
className={`search-bar ${isSearchInitiated ? 'top' : 'center'}`}
onSubmit={handleSearch}

>
<div onTransitionEnd={displayResult} className={`text-input-container ${isSearchInitiated ? 'search-initiated' : ''}`}>
<form className={`search-bar ${isSearchInitiated ? 'top' : 'center'}`} onSubmit={handleSearch}>
<div
onTransitionEnd={displayResult}
className={`text-input-container ${isSearchInitiated ? 'search-initiated' : ''}`}
>
<TextInput
type='text'
value={searchQuery}
Expand All @@ -134,55 +126,55 @@ export default function Home() {
/>
</div>
</form>
<Widget
className='n-bg-palette-neutral-bg-weak min-h-[60%] min-w-[60%] flex flex-col search-result'
header=''
isElevated={true}
id='search-result'
>
<Flex flexDirection='column' justifyContent='space-between'>
<div>
<Tabs size='large' fill='underline' onChange={(e) => setActiveTab(e)} value={activeTab}>
<Tabs.Tab tabId={0}>Table</Tabs.Tab>
<Tabs.Tab tabId={1}>Graph</Tabs.Tab>
</Tabs>
<Flex className='p-8'>
{activeTab === 0 ? (
<DataGrid<NetworkImpact>
isResizable={false}
tableInstance={table}
isKeyboardNavigable={false}
styling={{
zebraStriping: true,
borderStyle: 'none',
headerStyle: 'filled',
}}
components={{
Navigation: null,
}}
/>
) : (
<Flex flexDirection='row'>
<img src={NoGraphImg} className='p-12' />
<Flex gap='8'>
<Typography variant='h1'>WIP Screen</Typography>
<Typography variant='body-medium'>
<p>Ideally this would display a graph of the network/search result</p>
<p>
This would be interactive and allow user to explore the network to make a proper impact
analysis
</p>
</Typography>
</Flex>
<Widget
className='n-bg-palette-neutral-bg-weak min-h-[60%] min-w-[60%] flex flex-col search-result'
header=''
isElevated={true}
id='search-result'
>
<Flex flexDirection='column' justifyContent='space-between'>
<div>
<Tabs size='large' fill='underline' onChange={(e) => setActiveTab(e)} value={activeTab}>
<Tabs.Tab tabId={0}>Table</Tabs.Tab>
<Tabs.Tab tabId={1}>Graph</Tabs.Tab>
</Tabs>
<Flex className='p-8'>
{activeTab === 0 ? (
<DataGrid<NetworkImpact>
isResizable={false}
tableInstance={table}
isKeyboardNavigable={false}
styling={{
zebraStriping: true,
borderStyle: 'none',
headerStyle: 'filled',
}}
components={{
Navigation: null,
}}
/>
) : (
<Flex flexDirection='row'>
<img src={NoGraphImg} className='p-12' />
<Flex gap='8'>
<Typography variant='h1'>WIP Screen</Typography>
<Typography variant='body-medium'>
<p>Ideally this would display a graph of the network/search result</p>
<p>
This would be interactive and allow user to explore the network to make a proper impact
analysis
</p>
</Typography>
</Flex>
)}
</Flex>
</div>
<div className='text-center'>
<>Results for "{searchQuery}"</>
</div>
</Flex>
</Widget>
</Flex>
)}
</Flex>
</div>
<div className='text-center'>
<>Results for "{searchQuery}"</>
</div>
</Flex>
</Widget>
</div>
</>
);
Expand Down

0 comments on commit e04c016

Please sign in to comment.