Hacky first pass at titles
Hacky because the titles for some pages don't load until the data comes in, which takes a second. There's gotta be a better way.
This commit is contained in:
parent
f965e22c89
commit
102be62a7f
6 changed files with 28 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useSnapshot } from 'valtio'
|
||||
import classNames from 'classnames'
|
||||
|
||||
|
|
@ -106,6 +107,11 @@ const PartyDetails = (props: Props) => {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>
|
||||
{ (appSnapshot.party.name != null) ? appSnapshot.party.name : 'Untitled team'} by { (appSnapshot.party.user != null) ? `@${appSnapshot.party.user?.username}` : 'Anonymous' }
|
||||
</title>
|
||||
</Head>
|
||||
{readOnly}
|
||||
{editable}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCookies } from 'react-cookie'
|
||||
|
||||
|
|
@ -117,6 +118,9 @@ const ProfileRoute: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div id="Profile">
|
||||
<Head>
|
||||
<title>@{user.username}</title>
|
||||
</Head>
|
||||
<FilterBar onFilter={receiveFilters} scrolled={scrolled}>
|
||||
<div className="UserInfo">
|
||||
<img
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react'
|
||||
import Head from 'next/head'
|
||||
import Party from '~components/Party'
|
||||
|
||||
const NewRoute = () => {
|
||||
|
|
@ -9,6 +10,9 @@ const NewRoute = () => {
|
|||
|
||||
return (
|
||||
<div id="Content">
|
||||
<Head>
|
||||
<title>New Team</title>
|
||||
</Head>
|
||||
<Party new={true} pushHistory={callback} />
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
import Party from '~components/Party'
|
||||
|
|
@ -8,6 +9,9 @@ const PartyRoute: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div id="Content">
|
||||
<Head>
|
||||
<title>Party</title>
|
||||
</Head>
|
||||
<Party slug={slug as string} />
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCookies } from 'react-cookie'
|
||||
import clonedeep from 'lodash.clonedeep'
|
||||
|
|
@ -141,8 +142,12 @@ const SavedRoute: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div id="Teams">
|
||||
<Head>
|
||||
<title>Your saved Teams</title>
|
||||
</Head>
|
||||
|
||||
<FilterBar onFilter={receiveFilters} scrolled={scrolled}>
|
||||
<h1>Your saved teams</h1>
|
||||
<h1>Your saved Teams</h1>
|
||||
</FilterBar>
|
||||
|
||||
<section>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCookies } from 'react-cookie'
|
||||
import clonedeep from 'lodash.clonedeep'
|
||||
|
|
@ -141,6 +142,9 @@ const TeamsRoute: React.FC = () => {
|
|||
|
||||
return (
|
||||
<div id="Teams">
|
||||
<Head>
|
||||
<title>Discover Teams</title>
|
||||
</Head>
|
||||
<FilterBar onFilter={receiveFilters} scrolled={scrolled}>
|
||||
<h1>Discover Teams</h1>
|
||||
</FilterBar>
|
||||
|
|
|
|||
Loading…
Reference in a new issue