Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/acorn1010/vote
/ functions
Functions
68 in github.com/acorn1010/vote
⨍
Functions
68
◇
Types & classes
1
↓ 5 callers
Function
useTopicId
()
src/components/topics/useTopicId.ts:3
↓ 2 callers
Function
assertUserId
Returns the session's userId, else throws an exception.
src/server/router/models/post.ts:224
↓ 2 callers
Function
cropImage
Returns a cropped version of `blob` in a 2:1 aspect ratio for use on Twitter.
src/pages/_/twitter.tsx:117
↓ 2 callers
Function
filterPost
(post: T)
src/server/router/models/post.ts:237
↓ 2 callers
Function
formatErrors
( /** @type {import('zod').ZodFormattedError<Map<string,string>,string>} */ errors )
src/env/client.mjs:6
↓ 2 callers
Function
getServerAuthSession
(ctx: { req: GetServerSidePropsContext['req']; res: GetServerSidePropsContext['res']; })
src/server/common/get-server-auth-session.ts:8
↓ 2 callers
Function
makeHandleClick
(newMagnitude: -1 | 0 | 1)
src/components/buttons/UpvoteDownvote.tsx:22
↓ 1 callers
Function
addDays
(days: number)
src/utils/DateUtils.ts:2
↓ 1 callers
Function
createContextInner
(opts: CreateContextOptions)
src/server/router/context.ts:16
↓ 1 callers
Function
defineNextConfig
* Don't be scared of the generics here. * All they do is to give us autocompletion when using this. * * @template {import('next').NextConfig} T *
next.config.mjs:12
↓ 1 callers
Function
getBaseUrl
()
src/utils/trpc.ts:9
↓ 1 callers
Function
getLocalStorage
(key: string)
src/components/io/useLocalStorage.ts:43
↓ 1 callers
Function
getOptionStyle
* Returns the special style for this `option`. This includes a background image that displays the * % that voted on this option.
src/components/posts/PostPollOptions.tsx:144
↓ 1 callers
Function
getWinningPoll
(options: ExtendedPollOption[])
src/components/posts/PostPollOptions.tsx:159
↓ 1 callers
Function
isValidFileType
(file: File)
src/pages/_/twitter.tsx:111
↓ 1 callers
Function
readImageBlob
(blob: Blob)
src/pages/_/twitter.tsx:132
↓ 1 callers
Function
setLocalStorage
(key: string, value: T)
src/components/io/useLocalStorage.ts:58
↓ 1 callers
Function
toPrettyName
Given a `topicId` such as 'my-topic_ID'.
src/components/navigation/Navbar.tsx:56
↓ 1 callers
Function
usePostId
()
src/pages/[topicId]/[postId].tsx:10
Function
Button
(props: PropsWithChildren<ButtonProps>)
src/components/buttons/Button.tsx:12
Function
Container
(props: PropsWithChildren<ContainerProps>)
src/components/containers/Container.tsx:7
Function
Create
()
src/pages/[topicId]/create.tsx:21
Function
CreateNewPollButton
(props: { className?: string })
src/components/buttons/CreateNewPollButton.tsx:5
Function
Home
()
src/pages/index.tsx:5
Function
LogInButton
(props: { fullWidth?: boolean })
src/components/auth/LogInButton.tsx:4
Function
MenuItem
(props: PropsWithChildren<MenuItemProps>)
src/components/select/Select.tsx:91
Function
MenuItemWrapper
(props: PropsWithChildren<MenuItemWrapperProps>)
src/components/select/Select.tsx:57
Function
MobileMenuButton
(props: { open?: boolean })
src/components/navigation/Navbar.tsx:35
Function
MobileMenuDropdown
()
src/components/navigation/Navbar.tsx:63
Function
MyApp
({ Component, pageProps: { session, ...pageProps }, })
src/pages/_app.tsx:9
Function
NavItem
(props: NavItemProps)
src/components/navigation/Navbar.tsx:89
Function
NavLogInButton
()
src/components/navigation/Navbar.tsx:149
Function
NavLogInSection
()
src/components/navigation/Navbar.tsx:139
Function
NavProfile
()
src/components/navigation/NavProfile.tsx:7
Function
NavSearch
()
src/components/navigation/Navbar.tsx:112
Function
NavTitle
()
src/components/navigation/NavTitle.tsx:4
Function
Navbar
()
src/components/navigation/Navbar.tsx:14
Function
PageHeader
()
src/components/PageHeader.tsx:3
Function
Post
()
src/pages/[topicId]/[postId].tsx:14
Function
PostCard
(props: PostCardProps)
src/components/posts/PostCard.tsx:13
Function
PostHead
({ title }: { title: string })
src/pages/[topicId]/[postId].tsx:44
Function
PostOption
(props: { disableRemove?: boolean; errors: FieldErrors<CreatePostInputSchema>; register: UseFormRegister
src/pages/[topicId]/create.tsx:147
Function
PostOptions
(props: { control: Control<CreatePostInputSchema>; errors: FieldErrors<CreatePostInputSchema>; register:
src/pages/[topicId]/create.tsx:106
Function
PostPoll
(props: PostPollProps)
src/components/posts/PostPoll.tsx:16
Function
PostPollOption
(props: PostPollOptionProps)
src/components/posts/PostPollOptions.tsx:91
Function
PostPollOptions
(props: PostPollOptionsProps)
src/components/posts/PostPollOptions.tsx:18
Function
PostsList
()
src/components/posts/PostsList.tsx:7
Function
ResizeArea
()
src/pages/_/twitter.tsx:22
Function
Select
(props: SelectProps)
src/components/select/Select.tsx:11
Function
Skeleton
(props: { className?: string })
src/components/loading/Skeleton.tsx:4
Function
TitleLink
()
src/components/navigation/NavTitle.tsx:16
Function
Toggleable
(props: PropsWithChildren<{}>)
src/pages/[topicId]/create.tsx:191
Function
Tooltip
(props: PropsWithChildren<{ title: string }>)
src/components/tooltip/Tooltip.tsx:4
Function
Topic
()
src/pages/[topicId].tsx:7
Function
TopicHead
()
src/pages/[topicId].tsx:17
Function
TwitterClipper
()
src/pages/_/twitter.tsx:10
Function
UpvoteDownvote
(props: UpvoteDownvoteProps)
src/components/buttons/UpvoteDownvote.tsx:16
Function
config
()
src/utils/trpc.ts:16
Function
createContext
( opts: trpcNext.CreateNextContextOptions )
src/server/router/context.ts:27
Function
errorFormatter
({ shape })
src/server/trpc.ts:7
Function
examples
(req: NextApiRequest, res: NextApiResponse)
src/pages/api/examples.ts:5
Function
handleLeave
()
src/components/tooltip/Tooltip.tsx:28
Function
handlePaste
(e: ClipboardEvent)
src/pages/_/twitter.tsx:47
Function
jwt
({ token })
src/pages/api/auth/[...nextauth].ts:45
Function
onSubmit
(data: CreatePostInputSchema)
src/pages/[topicId]/create.tsx:42
Function
restricted
(req: NextApiRequest, res: NextApiResponse)
src/pages/api/restricted.ts:6
Function
session
({ session, token })
src/pages/api/auth/[...nextauth].ts:39
Function
useLocalStorage
( key: string, initialValue?: T )
src/components/io/useLocalStorage.ts:6