2022-03-21 20:20:41 -04:00
|
|
|
import type { PostVisibility } from "./types"
|
|
|
|
|
|
|
|
export default function getPostPath(visibility: PostVisibility, id: string) {
|
2022-03-23 18:34:23 -04:00
|
|
|
switch (visibility) {
|
|
|
|
case "private":
|
|
|
|
return `/post/private/${id}`
|
|
|
|
case "protected":
|
|
|
|
return `/post/protected/${id}`
|
|
|
|
case "unlisted":
|
|
|
|
case "public":
|
|
|
|
return `/post/${id}`
|
|
|
|
}
|
2022-03-21 20:20:41 -04:00
|
|
|
}
|