-
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(post): use pre-defined locations
- Loading branch information
Showing
6 changed files
with
34 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const CITY = { | ||
深圳: "深圳", | ||
}; | ||
|
||
const DISTRICT = { | ||
渔业社区: "宝安区西乡街道渔业社区", | ||
高新区社区: "南山区粤海街道高新区社区", | ||
}; | ||
|
||
const LOCATIONS = { | ||
财富港: { | ||
city: CITY.深圳, | ||
district: DISTRICT.渔业社区, | ||
spot: "财富港大厦", | ||
}, | ||
创维西座: { | ||
city: CITY.深圳, | ||
district: DISTRICT.高新区社区, | ||
spot: "创维半导体设计大厦西座" | ||
} | ||
}; | ||
|
||
export default function getLocation(spot: string) { | ||
return LOCATIONS[spot] || { spot }; | ||
} |
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
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,7 +1,6 @@ | ||
--- | ||
date: 2023-12-14 | ||
location: 深圳 财富港大厦 | ||
community: 宝安区西乡街道渔业社区 | ||
spot: 财富港 | ||
sort: Law | ||
tags: | ||
- Copyright | ||
|
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,7 +1,6 @@ | ||
--- | ||
date: 2019-06-02 | ||
location: 深圳 财富港大厦 | ||
community: 宝安区西乡街道渔业社区 | ||
spot: 财富港 | ||
sort: Miscellaneous | ||
tags: | ||
- Small Talk | ||
|