Skip to content

Commit

Permalink
use named export
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Oct 28, 2024
1 parent 6635fc1 commit 95da694
Show file tree
Hide file tree
Showing 10 changed files with 368 additions and 353 deletions.
8 changes: 3 additions & 5 deletions src/components/Projekte/Daten/TpopFilter/Ek/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Checkbox2States } from '../../../../shared/Checkbox2States.jsx'
import { RadioButtonGroup } from '../../../../shared/RadioButtonGroup.jsx'
import { Select } from '../../../../shared/Select.jsx'
import { TextField } from '../../../../shared/TextField.jsx'
import queryEk from './queryEk.js'
import { query } from './query.js'
import { ErrorBoundary } from '../../../../shared/ErrorBoundary.jsx'
import { Spinner } from '../../../../shared/Spinner.jsx'

Expand All @@ -29,10 +29,10 @@ const EkfrequenzOptionsContainer = styled.div`
}
`

const Ek = ({ saveToDb, row, fieldErrors }) => {
export const Ek = ({ saveToDb, row, fieldErrors }) => {
const { apId } = useParams()

const { data: dataEk, loading: loadingEk } = useQuery(queryEk, {
const { data: dataEk, loading: loadingEk } = useQuery(query, {
variables: {
apId,
},
Expand Down Expand Up @@ -110,5 +110,3 @@ const Ek = ({ saveToDb, row, fieldErrors }) => {
</SimpleBar>
)
}

export default Ek
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from '@apollo/client'

import { ekfrequenz } from '../../../../shared/fragments.js'

export default gql`
export const query = gql`
query TpopEkFilterQuery($apId: UUID!) {
allEkfrequenzs(filter: { apId: { equalTo: $apId } }, orderBy: SORT_ASC) {
nodes {
Expand Down
14 changes: 8 additions & 6 deletions src/components/Projekte/Daten/TpopFilter/Tabs.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback, useContext } from 'react'
import Tabs from '@mui/material/Tabs'
import MuiTabs from '@mui/material/Tabs'
import Tab from '@mui/material/Tab'
import styled from '@emotion/styled'

Expand All @@ -15,15 +15,15 @@ const Title = styled.div`
padding-left: 10px;
color: rgba(0, 0, 0, 0.87);
`
const StyledTabs = styled(Tabs)`
const StyledTabs = styled(MuiTabs)`
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
`
const StyledTab = styled(Tab)`
min-width: 70px !important;
text-transform: none !important;
`

const TpopOrTabs = ({ activeTab, setActiveTab, dataFilter }) => {
export const Tabs = ({ activeTab, setActiveTab, dataFilter }) => {
const store = useContext(StoreContext)
const { dataFilterAddOr } = store.tree

Expand Down Expand Up @@ -56,7 +56,11 @@ const TpopOrTabs = ({ activeTab, setActiveTab, dataFilter }) => {
scrollButtons="auto"
>
{dataFilter.map((filter, index) => (
<StyledTab key={index} label={index + 1} value={index} />
<StyledTab
key={index}
label={index + 1}
value={index}
/>
))}
<StyledTab
key={dataFilter.length}
Expand All @@ -68,5 +72,3 @@ const TpopOrTabs = ({ activeTab, setActiveTab, dataFilter }) => {
</Row>
)
}

export default TpopOrTabs
Loading

0 comments on commit 95da694

Please sign in to comment.