-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(mobile): update PointOfInterest model to factory function
- Loading branch information
1 parent
fbe2c6b
commit 7ac92b2
Showing
2 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
class PointOfInterest { | ||
constructor(key, id, lat, lon, title) { | ||
this.key = key; | ||
this.id = id; | ||
this.lat = lat; | ||
this.lon = lon; | ||
this.title = title; | ||
} | ||
interface PointOfInterestModelParams { | ||
id: string; | ||
key: string; | ||
latitude: number; | ||
longitude: number; | ||
title: string; | ||
} | ||
|
||
export default PointOfInterest; | ||
const PointOfInterestModel = ({ | ||
id, | ||
key, | ||
latitude, | ||
longitude, | ||
title, | ||
}: PointOfInterestModelParams) => ({ | ||
id, | ||
key, | ||
latitude, | ||
longitude, | ||
title, | ||
}); | ||
|
||
export default PointOfInterestModel; |