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 3a90762 commit 37c695d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
7 changes: 3 additions & 4 deletions src/components/Projekte/Daten/TpopmassnFilter/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 TpopmassnOrTabs = ({ activeTab, setActiveTab, dataFilter }) => {
export const Tabs = ({ activeTab, setActiveTab, dataFilter }) => {
const store = useContext(StoreContext)
const { dataFilterAddOr } = store.tree

Expand Down Expand Up @@ -69,4 +69,3 @@ const TpopmassnOrTabs = ({ activeTab, setActiveTab, dataFilter }) => {
)
}

export default TpopmassnOrTabs
12 changes: 6 additions & 6 deletions src/components/Projekte/Daten/TpopmassnFilter/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useContext, useState, useEffect } from 'react'
import { useCallback, useContext, useState, useEffect } from 'react'
import styled from '@emotion/styled'
import { observer } from 'mobx-react-lite'
import { useQuery } from '@apollo/client'
Expand All @@ -14,13 +14,13 @@ import { DateField } from '../../../shared/Date.jsx'

import { FilterTitle } from '../../../shared/FilterTitle.jsx'
import { constants } from '../../../../modules/constants.js'
import queryTpopmassns from './queryTpopmassns.js'
import queryAeTaxonomies from './queryAeTaxonomies.js'
import { query } from './query.js'
import { queryAeTaxonomies } from './queryAeTaxonomies.js'
import { StoreContext } from '../../../../storeContext.js'
import { ifIsNumericAsNumber } from '../../../../modules/ifIsNumericAsNumber.js'
import { ErrorBoundary } from '../../../shared/ErrorBoundary.jsx'
import { Error } from '../../../shared/Error.jsx'
import OrTabs from './Tabs.jsx'
import { Tabs } from './Tabs.jsx'

const Container = styled.div`
flex-grow: 1;
Expand Down Expand Up @@ -75,7 +75,7 @@ const TpopmassnFilter = () => {
}
}, [activeTab, dataFilter.tpopmassn.length])

const { data, loading, error } = useQuery(queryTpopmassns, {
const { data, loading, error } = useQuery(query, {
variables: {
filteredFilter: tpopmassnGqlFilter.filtered,
allFilter: tpopmassnGqlFilter.all,
Expand Down Expand Up @@ -180,7 +180,7 @@ const TpopmassnFilter = () => {
</FilterCommentList>
</>
)}
<OrTabs
<Tabs
dataFilter={dataFilter.tpopmassn}
activeTab={activeTab}
setActiveTab={setActiveTab}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client'

export default gql`
export const query = gql`
query tpopmassnsFilterQuery(
$filteredFilter: TpopmassnFilter!
$allFilter: TpopmassnFilter!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client'

export default gql`
export const queryAeTaxonomies = gql`
query TpopmassnFilterAeTaxonomiesQueryForTpopmassn(
$filter: AeTaxonomyFilter!
) {
Expand Down

0 comments on commit 37c695d

Please sign in to comment.