Skip to content

Commit

Permalink
displayname fix
Browse files Browse the repository at this point in the history
Signed-off-by: Shrinath Nayak <shrinath.nayak@bazaarvoice.com>
  • Loading branch information
Shrinath Nayak committed Dec 30, 2022
1 parent 0979df1 commit 828e0b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/share/[username].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Link from 'next/link'

import ContributionsGraph from '../../components/ContributionsGraph'
import Layout from '../../components/Layout'
import type { ErrorData, GraphData, GraphSettings, GraphSize, Themes } from '../../types'
import type { ErrorData, GraphData, GraphSettings, GraphSize, Themes, DisplayName } from '../../types'

interface Props {
username: string
Expand Down Expand Up @@ -101,8 +101,9 @@ UserSharePage.getInitialProps = ({ query }) => {

const size = typeof query.size === 'string' ? (query.size as GraphSize) : undefined
const theme = typeof query.theme === 'string' ? (query.theme as Themes) : undefined
const displayName = typeof query.displayName === 'string' ? (query.displayName as DisplayName) : undefined

return { username, settings: { size, theme } }
return { username, settings: { size, theme, displayName } }
}

UserSharePage.getLayout = (page: React.ReactElement) => {
Expand Down

0 comments on commit 828e0b0

Please sign in to comment.