Skip to content

Commit

Permalink
Merge pull request #228 from kartevonmorgen/develop
Browse files Browse the repository at this point in the history
Issues 226, 211
  • Loading branch information
navid-kalaei authored Sep 6, 2024
2 parents 5aec0c0 + 45b68de commit 4fdf635
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/EntityDetailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { createSlugPathFromQueryAndRemoveSlug } from '../utils/slug'
import { deleteSlugLevelsFromRouter } from '../utils/router'


const onBack = (router: NextRouter) => () => {
export const onBack = (router: NextRouter) => () => {
const newQueryParams = deleteSlugLevelsFromRouter(2, router)
const [newPath, newQueryWithoutSlug] = createSlugPathFromQueryAndRemoveSlug(newQueryParams)

Expand Down
9 changes: 7 additions & 2 deletions components/EntryDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EntityAddress from './EntityAddress'
import EntityTags from './EntityTags'
import EntityRatings from './EntityRatings'
import EntityFooter from './EntityFooter'
import EntityDetailHeader from './EntityDetailHeader'
import EntityDetailHeader, { onBack } from './EntityDetailHeader'
import OpeningHours from './OpeningHours'
import EntryLinks from './EntryLinks'
import TypeTag from './TypeTag'
Expand Down Expand Up @@ -123,7 +123,12 @@ const EntryDetail: FC<EntryDetailProps> = (props) => {
<Text>{t('entryDetails.entryIsInvisibleBeforeApprovement')}</Text>
</Paragraph>

<Button type="primary">{t('backToSearch')}</Button>
<Button
onClick={onBack(router)}
type="primary"
>
{t('backToSearch')}
</Button>
</div>
)
}
Expand Down
12 changes: 6 additions & 6 deletions components/MapSharingDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import useTranslation from 'next-translate/useTranslation'
import { Button, Dropdown, Menu } from 'antd'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import CopyURLToClipboardButton from './CopyURLToClipboardButton'
// import MapSharingModal from './MapSharingModal'
import SubscriptionModal from './SubscriptionModal'
import MapSharingModal from './MapSharingModal'
// import SubscriptionModal from './SubscriptionModal'


const { Item } = Menu
Expand All @@ -16,15 +16,15 @@ const menu = (
right: 40,
}}
>
<Item
{/* <Item
icon={
<FontAwesomeIcon
icon={["fas", "bell"]}
/>
}
>
<SubscriptionModal/>
</Item>
</Item> */}

<Item
icon={
Expand All @@ -35,15 +35,15 @@ const menu = (
<CopyURLToClipboardButton/>
</Item>

{/* <Item
<Item
icon={
<FontAwesomeIcon
icon="code"
/>
}
>
<MapSharingModal/>
</Item> */}
</Item>
</Menu>
)

Expand Down
2 changes: 1 addition & 1 deletion consts/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = 'v1.2.8'
const version = 'v1.2.9'


export default version

0 comments on commit 4fdf635

Please sign in to comment.